简体   繁体   中英

Could not locate the assembly "System.Fabric"

Seeing the following build warning in command prompt,

D:\\CxCache\\MsBuild.Corext.14.0.23107.9\\v14.0\\bin\\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Coul d not resolve this reference. Could not locate the assembly " System.Fabric ". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

followed by the error,

D:\\CxCache\\MsBuild.Corext.14.0.23107.9\\v14.0\\bin\\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly " System.Fabric ". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. For SearchPath "{TargetFrameworkDirectory}". Considered "D:\\CxCache\\DotNetFxRefAssemblies.Corext.4.6.0\\System.Fabric.dll", but it didn't exist. Considered "D:\\CxCache\\DotNetFxRefAssemblies.Corext.4.6.0\\System.Fabric.exe", but it didn't exist.

My change,

From:
package id="Microsoft.ServiceFabric" version="5.2.207"

To:

package id="Microsoft.ServiceFabric" version="6.3.187"

I am new to Nuget and msbuild. Looking for starting pointers...Please help.

Okay, I did some research and nuget has Microsoft.ServiceFabric there are 2 ways to do this. Open the Package Manager (nuget) console, or open nuget package manager. The Package Manager is located in visual studio (Tools > Nuget Package Manager > Package Manager) and/or around that area, that one is easy to look up. For installing you want to enter this into your package manager.

[Install-Package Microsoft.ServiceFabric -Version 7.0.466] or any version that follow in your visual studio project. Looking on nuget (dot) org you can find it easily and all the accepted versions, I already said this and I'll say it again. Be sure to be in your project when you do this and the reference will be added.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM