Pet*_*ter 26 c# visual-studio-code
我想在我在OSX上使用Visual Studio Code编写的控制台应用程序中引用System.Drawing.dll.即我想使用这些使用语句
using System.Drawing;
using System.Drawing.Imaging;
Run Code Online (Sandbox Code Playgroud)
避免这种构建错误
Program.cs(56,20): error CS0246: The type or namespace name `Bitmap' could not be found. Are you missing an assembly reference?
Run Code Online (Sandbox Code Playgroud)
我找不到这方面的教程,我甚至不知道dll是否可用于.net核心或单声道或任何visual-studio-code使用.
Ahm*_*mad 15
在你的.csproj文件,添加你的依赖作为一个PackageReference
在ItemGroup
,然后运行dotnet restore
或nuget restore
.例:
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
<PackageReference Include="Realm" Version="2.1.0" />
<PackageReference Include="xunit">
<Version>2.3.1</Version>
</PackageReference>
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)
请查看本文以获得完整的解释.
归档时间: |
|
查看次数: |
57132 次 |
最近记录: |