this is a project I open and edit everyday recently
One day I can still compile, build, publish the project before i go lunch,
after i came back, its build fail and show error box build fail (There were build errors,would you like to continue and run the last successful build), but there is no error shown ( i didn't change anything except some string, and it is local project thus only me can edit it)
there is warning message but i dont know if it matter at all
Severity Code Description Project File Line Suppression State
Warning Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:
I wonder how can a solution die by itself suddenly and how can I trace and recover this solution (as mentioned, i was working on this project just before lunch)
Output
2>------ Rebuild All started: Project: Iing.WebApp, Configuration: Debug Any CPU ------
2>Build started 4/12/2019 3:54:53 PM.
2>CoreClean:
2> Deleting file "C:\Users\sammak\Documents\Projects\MODIST2017 - Copy\Iing.WebApp\obj\Debug\Iing.WebApp.csprojAssemblyReference.cache".
2> Deleting file "C:\Users\sammak\Documents\Projects\MODIST2017 - Copy\Iing.WebApp\obj\Debug\RdlCompile.cache".
2>_HandlePackageFileConflicts:
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.IO.dll'. NETSDK1033: Choosing 'Platform:System.IO.dll' because AssemblyVersion '4.1.2.0' is greater than '4.1.1.0'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Runtime, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Runtime.dll'. NETSDK1033: Choosing 'Platform:System.Runtime.dll' because AssemblyVersion '4.1.2.0' is greater than '4.1.1.1'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Security.Cryptography.Algorithms.dll'. NETSDK1033: Choosing 'Platform:System.Security.Cryptography.Algorithms.dll' because AssemblyVersion '4.3.0.0' is greater than '4.2.1.0'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Security.Cryptography.Encoding.dll'. NETSDK1033: Choosing 'Platform:System.Security.Cryptography.Encoding.dll' because AssemblyVersion '4.0.2.0' is greater than '4.0.1.0'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Security.Cryptography.Primitives.dll'. NETSDK1033: Choosing 'Platform:System.Security.Cryptography.Primitives.dll' because AssemblyVersion '4.0.2.0' is greater than '4.0.1.0'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Security.Cryptography.X509Certificates.dll'. NETSDK1033: Choosing 'Platform:System.Security.Cryptography.X509Certificates.dll' because AssemblyVersion '4.1.2.0' is greater than '4.1.1.2'.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Reference:System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' and 'Platform:System.Net.Http.WebRequest.dll'. NETSDK1038: Could not determine winner because 'Reference:System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' does not exist.
2>D:\VS2017\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets(33,5): message NETSDK1041: Encountered conflict between 'Platform:System.Net.Http.WebRequest.dll' and 'Reference:System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL'. NETSDK1038: Could not determine winner because 'Reference:System.Net.Http.WebRequest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' does not exist.
2>
Seems like Microsoft already deals with that problem and working on a fix. Also there seems to be a workaround (I have not tried it yet)
https://marketplace.visualstudio.com/items?itemName=ProBITools.MicrosoftRdlcReportDesignerforVisualStudio-18001&ssr=false#review-details
Same problem,
1>Build FAILED.
1> 0 Warning(s)
1> 0 Error(s)
So, I search in output windows for failed, then I found this
1>Task "RdlCompile"
1>Done executing task "RdlCompile" -- FAILED.
1>Done building target "RunRdlCompiler" in project "foo.vbproj" -- FAILED.
make sure you have this option: output verbosity = detailed,
options / build and run / "MSBuild project build output verbosity" = detailed
Related
after updating SpecflowRunner to 3.5.8 and re-installing the Specflow Package 2017.2.1 my tests cannot be executed and are skipped instead. When I open the log file I find this Error message:
Error while unpacking executor: System.TypeLoadException: The method "Initialize" in type "TechTalk.SpecRun.Framework.TestAssemblyExecutor" of the assembly "TechTalk.SpecRun.Framework.Executor, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null" is not implemented.
(Sorry, I had to translate the message)
A friend of mine has the same versions, but everything runs smoothly. We both use Visual Studio 2017.
Did I miss something, a cache that has to be cleared or anything else?
You have probably some old leftover files from before the update in your obj and bin folder.
Close Visual Studio
delete the folders
start Visual Studio
Rebuild Solution
After that, you should be able to execute your tests again.
While running my unit test in VS2017 in debug mode, after the build the run starts but immediately after i get an exception before any of my breakpoints are hit:
Managed Debugging Assistant 'BindingFailure'
Message=Managed Debugging Assistant 'BindingFailure' :'*The assembly with display name 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter' or one of its dependencies. The system cannot find the file specified.*'
How can I figure it out where is this issue coming from?
The file in the exception message can be found under:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions and has the version 15.0.28307
The VS2017 that i use has the version 15.9.11
I keep getting this error when i try to use Azure Pipelines.
I am running this on the Hosted VS2017 pool.
Here is the pipeline i constructed:
The error i keep getting is displayed in the following logs:
2019-04-30T12:13:03.1506572Z =============================================================================
2019-04-30T12:13:03.1506616Z Task : .NET Core
2019-04-30T12:13:03.1506659Z Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command. For package commands, supports NuGet.org and authenticated feeds like Package Management and MyGet.
2019-04-30T12:13:03.1506705Z Version : 2.150.1
2019-04-30T12:13:03.1506734Z Author : Microsoft Corporation
2019-04-30T12:13:03.1506782Z Help : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2019-04-30T12:13:03.1506811Z ==============================================================================
2019-04-30T12:13:03.7965121Z [command]C:\windows\system32\chcp.com 65001
2019-04-30T12:13:03.8059420Z Active code page: 65001
2019-04-30T12:13:03.8489997Z [command]"C:\Program Files\dotnet\dotnet.exe" build D:\a\1\s\SLDatatHighway.Tests\SLDatatHighway.Tests.csproj
2019-04-30T12:13:04.1500736Z Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
2019-04-30T12:13:04.1501599Z Copyright (C) Microsoft Corporation. All rights reserved.
2019-04-30T12:13:04.1501793Z
2019-04-30T12:13:04.8585498Z Restoring packages for D:\a\1\s\SLDatatHighway.Tests\SLDatatHighway.Tests.csproj...
2019-04-30T12:13:05.0444966Z Restore completed in 185.75 ms for D:\a\1\s\SLDatatHighway.Tests\SLDatatHighway.Tests.csproj.
2019-04-30T12:13:07.0489863Z SLDatatHighway.Tests -> D:\a\1\s\SLDatatHighway.Tests\bin\Debug\netstandard2.0\SLDatatHighway.Tests.dll
2019-04-30T12:13:07.0572034Z
2019-04-30T12:13:07.0572433Z Build succeeded.
2019-04-30T12:13:07.0572907Z 0 Warning(s)
2019-04-30T12:13:07.0573263Z 0 Error(s)
2019-04-30T12:13:07.0573380Z
2019-04-30T12:13:07.0573422Z Time Elapsed 00:00:02.84
2019-04-30T12:13:07.0915364Z [command]"C:\Program Files\dotnet\dotnet.exe" build D:\a\1\s\SL_DataHighway.Tests\SL_DataHighway.Tests.csproj
2019-04-30T12:13:07.3764095Z Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
2019-04-30T12:13:07.3807448Z Copyright (C) Microsoft Corporation. All rights reserved.
2019-04-30T12:13:07.3807518Z
2019-04-30T12:13:08.1015074Z Restoring packages for D:\a\1\s\SL_DataHighway.Tests\SL_DataHighway.Tests.csproj...
2019-04-30T12:13:08.7878736Z Restore completed in 484.69 ms for D:\a\1\s\SL_DataHighway.Tests\SL_DataHighway.Tests.csproj.
2019-04-30T12:13:14.0395526Z SL_DataHighway.Tests -> D:\a\1\s\SL_DataHighway.Tests\bin\Debug\netcoreapp2.1\SL_DataHighway.Tests.dll
2019-04-30T12:13:14.0481411Z
2019-04-30T12:13:14.0482045Z Build succeeded.
2019-04-30T12:13:14.0483401Z 0 Warning(s)
2019-04-30T12:13:14.0483487Z 0 Error(s)
2019-04-30T12:13:14.0483908Z
2019-04-30T12:13:14.0484034Z Time Elapsed 00:00:06.60
2019-04-30T12:13:14.0864499Z [command]"C:\Program Files\dotnet\dotnet.exe" build D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj
2019-04-30T12:13:14.3705111Z Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
2019-04-30T12:13:14.3705588Z Copyright (C) Microsoft Corporation. All rights reserved.
2019-04-30T12:13:14.3705720Z
2019-04-30T12:13:14.8626284Z Nothing to do. None of the projects specified contain packages to restore.
2019-04-30T12:13:15.3736897Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.3779682Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.4465770Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2729,5): error MSB4062: The "Microsoft.Build.Tasks.ResolveComReference" task could not be loaded from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.4550056Z
2019-04-30T12:13:15.4554234Z Build FAILED.
2019-04-30T12:13:15.4554556Z
2019-04-30T12:13:15.4574427Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.4579425Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.4580177Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2729,5): error MSB4062: The "Microsoft.Build.Tasks.ResolveComReference" task could not be loaded from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.4583312Z 2 Warning(s)
2019-04-30T12:13:15.4583865Z 1 Error(s)
2019-04-30T12:13:15.4585281Z
2019-04-30T12:13:15.4585654Z Time Elapsed 00:00:01.01
2019-04-30T12:13:15.4950879Z ##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
2019-04-30T12:13:15.4960391Z ##[error]Dotnet command failed with non-zero exit code on the following projects : D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj
2019-04-30T12:13:15.4994396Z ##[section]Finishing: dotnet build
2019-04-30T12:13:15.5009622Z ##[section]Starting: Checkout
2019-04-30T12:13:15.5109587Z ==============================================================================
2019-04-30T12:13:15.5109634Z Task : Get sources
2019-04-30T12:13:15.5109671Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2019-04-30T12:13:15.5109870Z Version : 1.0.0
2019-04-30T12:13:15.5109906Z Author : Microsoft
2019-04-30T12:13:15.5109940Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2019-04-30T12:13:15.5109992Z ==============================================================================
2019-04-30T12:13:15.9176300Z Cleaning any cached credential from repository: SL-DataHighway (Git)
2019-04-30T12:13:15.9266683Z ##[section]Finishing: Checkout
2019-04-30T12:13:15.9371889Z ##[section]Starting: Finalize Job
2019-04-30T12:13:15.9414810Z Start cleaning up orphan processes.
2019-04-30T12:13:15.9425504Z ##[section]Finishing: Finalize Job
2019-04-30T12:13:15.9475730Z ##[section]Finishing: Job
Building via Visual Studio 2017 works fine. Problem is only when I try to build via an Azure Pipeline.
Is there something I am missing or did I import something wrong?
Here is an overview of the references in my project. As you can see the Outlook Interop is referenced fine as well as the Office reference.
My packages.config file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Office.Interop.Outlook" version="15.0.4797.1003" targetFramework="net461" />
</packages>
Thank you in advance!
EDIT: Added pool, Added overview of packages.config
Visual Studio 2017 Professional.
Native C++ project.
After I have changed some of project settings project building ends with this:
Microsoft.CppCommon.targets(770,5): error MSB4018: The "VCMessage" task failed unexpectedly.
Microsoft.CppCommon.targets(770,5): error MSB4018: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Microsoft.CppCommon.targets(770,5): error MSB4018: at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
...
PlatformToolSet mentioned here is set.
What's wrong?
This time it is
Configuration Properties -> Linker -> Debugging -> Generate Program Database File
If the file name is omitted (while the neighbour option "Generate Debug Info" is not "No") then VS-2017 finishes building with the error MSB4018. A target is built in this case nevertheless.
Right-click on the project and go to Properties > Linker > General.
Then set "Output File" to "Inherit from parent or project defaults"
Go to the error list window and click on the error and you may get more information. In my case it pointed to a line in Microsoft.CppCommon.targets which was an XML element. In the arguments attribute one value was %(Link.ProgramDatabaseFile) which was not set and causing the problem.
I am using Xunit.net with Visual Studio Online hosted build. My tests are being discovered and run fine both locally and on the build server. But on the build server I get this exception (causing the build to reach a "Partially Succeeded" state). This is odd, since all my tests are in fact being discovered and run.
[xUnit.net 00:00:01.3170293] Exception discovering tests from C:\a\bin\xunit.runner.visualstudio.testadapter.dll: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value HKLM\Software\Microsoft\Fusion!EnableLog to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at Xunit.Sdk.Executor.EnumerateTests..ctor(Executor executor, Object _handler)$$RethrowMarker$$ at ExceptionExtensions.RethrowWithNoStackTraceLoss(Exception ex)
at Xunit.RemoteAppDomainManager.CreateObjectTObject
at Xunit.Xunit1Executor.EnumerateTests(ICallbackEventHandler handler)
at Xunit.Xunit1.Find(Predicate`1 filter, Boolean includeSourceInformation, IMessageSink messageSink)
at Xunit.Xunit1.Find(Boolean includeSourceInformation, IMessageSink messageSink)
at Xunit.XunitFrontController.Find(Boolean includeSourceInformation, IMessageSink messageSink)
at Xunit.Runner.VisualStudio.TestAdapter.VsTestRunner.GetTests(IEnumerable`1 sources, IMessageLogger logger, XunitVisualStudioSettings settings, Stopwatch stopwatch)
See http://go.microsoft.com/fwlink/?LinkId=254169
I have the following nuget packages installed in the test project:
xunit 1.9.2
xunit.runner.visualstudio 0.99.2
Other unit testing frameworks, such as MS Test and NUnit, are working without problems. This makes me think the issue is with Xunit.net rather than with Visual Studio Online.
I have also opened an issue at the xUnit.net GitHub, but it remains unsolved.
https://github.com/xunit/xunit/issues/47
How can I get this working? Does anyone know of a workaround? Could I somehow suppress the error message?
The testrunner tries to discover the unit tests in xunit.runner.visualstudio.testadapter.dll. Why? Because it matches the default test sources spec of *.test*.dll.
When changing the default test source spec to *.tests.dll or something else more specific, it will work.
Source: http://erictummers.wordpress.com/2014/02/11/execute-xunit-tests-on-hosted-build-controller/