2013-05-30 45 views
2

我在Xamarin下有一个测试项目,当我尝试运行它时,它告诉我它无法从屏幕截图加载System.Core,但很明显,System.Core是其中的一个参考。Xamarin/Mono找不到System.Core

这可能是错误吗?

(打开新选项卡中的图片看到它的全部细节)

xamarin test error

看来问题是我的主要项目没有测试项目。 当我看到他们是红色的所有参考。所以我删除了它们,并尝试 再次添加它们,但没有提及添加。看到下面的图片。

enter image description here

+0

我想我创建的项目为PCL。 http://stackoverflow.com/questions/16747774/how-do-i-add-a-system-core-dll-reference-to-my-project-in-xamarin-studio-monodev提出了什么问题。这是一个Xamarin的bug,他们只是不支持PCL。好吧,但如何取消PCL我的图书馆? – bradgonesurfing

回答

2

下面编辑给的.csproj文件解决了这一问题

--- a/SketchSolveC#/SketchSolveC#.csproj 
+++ b/SketchSolveC#/SketchSolveC#.csproj 
@@ -6,12 +6,9 @@ 
    <ProductVersion>12.0.0</ProductVersion> 
    <SchemaVersion>2.0</SchemaVersion> 
    <ProjectGuid>{46D849FA-8E4B-4656-B494-290697EBD9EC}</ProjectGuid> 
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> 
    <OutputType>Library</OutputType> 
    <RootNamespace>SketchSolveC</RootNamespace> 
    <AssemblyName>SketchSolveC#</AssemblyName> 
- <TargetFrameworkProfile>Profile1</TargetFrameworkProfile> 
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> 
    </PropertyGroup> 
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 
    <DebugSymbols>true</DebugSymbols> 
@@ -30,15 +27,13 @@ 
    <ConsolePause>false</ConsolePause> 
    </PropertyGroup> 
    <ItemGroup> 
- <Reference Include="System" /> 
- <Reference Include="System.Xml" /> 
- <Reference Include="System.Core" /> 
- </ItemGroup> 
- <ItemGroup> 
    <Compile Include="Properties\AssemblyInfo.cs" /> 
    <Compile Include="SketchSolve.cs" /> 
+ <Reference Include="System.Xml" /> 
+ <Reference Include="System.Data.Linq" /> 
+ <Reference Include="System.Core" /> 
+ <Reference Include="System.Xml.Linq" /> 
    </ItemGroup> 
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> 
    <ProjectExtensions> 
    <MonoDevelop> 
     <Properties> 
@@ -49,4 +44,4 @@ 
     </Properties> 
    </MonoDevelop> 
    </ProjectExtensions> 
-</Project> 
\ No newline at end of file 
+</Project>