我刚开始使用 .NET 标准。在概念验证项目中,我尝试使用 Dapper 作为我的 ORM。在 .NET Standard 2.0 类库项目中,我添加了 Dapper 1.50.5 Nuget 包。但是,程序集不会在运行时加载。我收到此错误:
System.IO.FileNotFoundException HResult=0x80070002
Message=Could not load file or assembly 'Dapper, Version=1.50.5.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The system cannot find the file specified.
Run Code Online (Sandbox Code Playgroud)
我的 .csproj 的完整内容:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="1.50.5" />
<PackageReference Include="Npgsql" Version="4.0.4" />
<PackageReference Include="System.Data.SqlClient" Version="4.6.0" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.3.0" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.5.1" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.2" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.1" />
</ItemGroup>
</Project>
Run Code Online (Sandbox Code Playgroud)
所以,你看我已经安装了依赖项和依赖项的依赖项。
我还应该做什么?
这是场景...我在远程计算机上部署了一个 dll,该计算机具有所需的 .NET 框架,但没有 Visual Studio 和工具。同一天,我为 dll 创建了 3 个具有不同强名称的版本。我需要验证远程计算机上的强名称,但我没有机会获得该 dll 的副本。如果远程计算机上没有 SDK,我该如何执行此操作?
我正在通过WCF get调用获取存储在SQL中的PNG图像.该图像被编码为base64字符串并传递给我的AS3代码.我需要从数据中提取图像并在场景中显示它.
除其他外,我也试过这个......
var imgArray:ByteArray = Base64.decodeToByteArray(responseXML.ImageObject);
var myRect:Rectangle = new Rectangle(100,100,200,200);
var bmd:BitmapData = new BitmapData(200,200,true,0xAAAAAAAA);
bmd.setPixels(myRect, imgArray);
var image:Bitmap = new Bitmap(bmd,"auto",true);
this.addChild(image);
Run Code Online (Sandbox Code Playgroud)
但无济于事.
救命!