Microsoft.Web.Infrastructure is not created in the bin directory on one of my TFS build servers

This is my mistake: http://i.imgur.com/hWm3Ta2.png resolved by removing "Microsoft.Web.Infrastructure.dll" in my bin bin directory after it was successfully built.

I have the same project that runs on one build server and not on another. My problem is that "Microsoft.Web.Infrastructure.dll" is missing in the bin directory of my project on one build server, but not in the other after creating the project. The Microsoft.Web.Infrastructure link has the Copy Local property to True.

Both build servers have TFS and IIS for quick testing / deployment. Obviously, the problem is with the build server, but all my research did not help me find a solution.

A more detailed error was found from my build log:

The primary link is "Microsoft.Web.Infrastructure, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35, processorArchitecture = MSIL". c: \ WINDOWS \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets (1360.9): warning MSB3245: Failed to resolve this link. Could not find assembly "Microsoft.Web.Infrastructure, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35, processorArchitecture = MSIL". Make sure the assembly exists on disk. If this link is required for your code, you may get compilation errors.

, DLL, . , , DLL , , , . /packages/folder "packages\Microsoft.Web.Infrastructure.1.0.0.0", lib DLL. .

+4
3

. VS , msbuild.exe. Microsoft.Web.Infrastructure.dll , , msbuild. .csproj . VS2015 VS2017. . " " "Microsoft.Web.Infrastructure" true VS2017. : .csproj , :

<Reference Include="Microsoft.Web.Infrastructure, ...>
<HintPath>..\packages\...\Microsoft.Web.Infrastructure.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes>  <-- this line was missing
<Private>True</Private>  <-- this line was missing
</Reference>

<Private> -tag, " ". , " " false VS, , . msbuild, .

+3

. , TeamCity dll bin. , .

, dll GAC Windows 2012 GacUtil. , , , SDK.net.

gacutil -i "C:\LOCACTION\Microsoft.Web.Infrastructure.dll"
+1

Perhaps your solution is looking for version 1.0.0.0, and in fact you have another version mentioned in your project?

0
source

All Articles