.NET SDK項目類型引用問題 - .NET SDK project type reference issue -开发者知识库

.NET SDK項目類型引用問題 - .NET SDK project type reference issue -开发者知识库,第1张

I have this in my new style .csproj:

我的新風格.csproj:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net461</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
  <ItemGroup>
    <Reference Include="System.Data.SqlServerCe">
      <HintPath>..\OtherProject\System.Data.SqlServerCe.dll</HintPath>
    </Reference>
  </ItemGroup>

</Project>

But VS keeps resolving the reference to:

但VS一直在解決以下問題:

C:\Users\Me\.nuget\packages\microsoft.sqlserver.compact.0.8876.1\lib\net40\System.Data.SqlServerCe.dll

But this is the wrong assembly version (the one in the file system is 4.0.0.1, and the nuget one is 4.0.0.0)

但這是錯誤的匯編版本(文件系統中的版本是4.0.0.1,而nuget版本是4.0.0.0)

What do I need to add to my csproj?

我需要將什么添加到我的csproj中?

1 个解决方案

#1


0  

Please try specifying Version=4.0.0.1, or any version you desire, in the <Reference> tag:

請嘗試在 標記中指定Version = 4.0.0.1或您需要的任何版本:

<Reference Include="System.Data.SqlServerCe, Version=4.0.0.1">
  <HintPath>..\OtherProject\System.Data.SqlServerCe.dll</HintPath>
</Reference>

最佳答案:

本文经用户投稿或网站收集转载,如有侵权请联系本站。

发表评论

0条回复