After I add the nuget CommunityToolkit.Mvvm version(8.1.0) in my project it gives lots of errors. Most of them are for unhandled exceptions. Here is some examples,
>CSC : warning CS8032: An instance of analyzer CommunityToolkit.Mvvm.SourceGenerators.UnsupportedCSharpLanguageVersionAnalyzer cannot be created from C:\Users\khras\.nuget\packages\communitytoolkit.mvvm\8.1.0\analyzers\dotnet\roslyn4.3\cs\CommunityToolkit.Mvvm.SourceGenerators.dll : Could not load file or assembly 'System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified..
1>CSC : warning CS8032: An instance of analyzer CommunityToolkit.Mvvm.SourceGenerators.INotifyPropertyChangedGenerator cannot be created from C:\Users\khras\.nuget\packages\communitytoolkit.mvvm\8.1.0\analyzers\dotnet\roslyn4.3\cs\CommunityToolkit.Mvvm.SourceGenerators.dll : Could not load file or assembly 'System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified..
1>CSC : warning CS8032: An instance of analyzer CommunityToolkit.Mvvm.SourceGenerators.ObservableObjectGenerator cannot be created from C:\Users\khras\.nuget\packages\communitytoolkit.mvvm\8.1.0\analyzers\dotnet\roslyn4.3\cs\CommunityToolkit.Mvvm.SourceGenerators.dll : Could not load file or assembly 'System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified..
1>CSC : warning CS8032: An instance of analyzer CommunityToolkit.Mvvm.SourceGenerators.ObservableRecipientGenerator cannot be created from C:\Users\khras\.nuget\packages\communitytoolkit.mvvm\8.1.0\analyzers\dotnet\roslyn4.3\cs\CommunityToolkit.Mvvm.SourceGenerators.dll : Could not load file or assembly 'System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified..
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error :
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : Unhandled Exception: System.NotImplementedException: The method or operation is not implemented.
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CommonCompiler.LoggingMetadataFileReferenceResolver.GetHashCode()
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Roslyn.Utilities.Hash.Combine[T](T newKeyPart, Int32 currentKey)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CompilationOptions.GetHashCodeHelper()
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions.GetHashCode()
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at System.Collections.Generic.ObjectEqualityComparer`1.GetHashCode(T obj)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at System.Collections.Generic.HashSet`1.InternalGetHashCode(T item)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at System.Collections.Generic.HashSet`1.AddIfNotPresent(T value)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.InputNode`1.UpdateStateTable(Builder graphState, NodeStateTable`1 previousTable, CancellationToken cancellationToken)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode[T](IIncrementalGeneratorNode`1 source)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.TransformNode`2.UpdateStateTable(Builder builder, NodeStateTable`1 previousTable, CancellationToken cancellationToken)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode[T](IIncrementalGeneratorNode`1 source)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CombineNode`2.UpdateStateTable(Builder graphState, NodeStateTable`1 previousTable, CancellationToken cancellationToken)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode[T](IIncrementalGeneratorNode`1 source)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.TransformNode`2.UpdateStateTable(Builder builder, NodeStateTable`1 previousTable, CancellationToken cancellationToken)
I've tried building the project with uninstalling the nuget package and it works fine. The strange thing is I can not find the packages in my solution explorer after I install the nuget.
I've tried with cleaning the project, restarting VS 2022 and restarting my pc. But it does not seems to work. Any help will be greatly appriciated.
If you need more information just ask in the comment.
Update:
I've found another error in the Analyzer,
The source generator features from the MVVM Toolkit require consuming projects to set the C# language version to at least C# 8.0. Make sure to add <LangVersion>8.0</LangVersion> (or above) to your .csproj file.
But the Language version is set to 10.
Related
Using Microsoft Visual Studio 2022 to build a C# Web API project with .NET 6 Framework, the project builds fine on one machine. I cloned the same source code repository into a different machine, but when building in the new machine I get the following error:
FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Microsoft.AspNetCore.Razor.Tasks.StaticWebAssetsManifest.ComputeManifestHash()
at Microsoft.AspNetCore.Razor.Tasks.StaticWebAssetsManifest.Create(String source, String basePath, String mode, String manifestType, ReferencedProjectConfiguration[] referencedProjectConfigurations, DiscoveryPattern[] discoveryPatterns, StaticWebAsset[] assets)
at Microsoft.AspNetCore.Razor.Tasks.GenerateStaticWebAssetsManifest.Execute()
ResultsMonitor.API C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets 411
Severity Code Description Project File Line Suppression State
Error FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Microsoft.AspNetCore.Razor.Tasks.StaticWebAssetsManifest.ComputeManifestHash()
at Microsoft.AspNetCore.Razor.Tasks.StaticWebAssetsManifest.Create(String source, String basePath, String mode, String manifestType, ReferencedProjectConfiguration[] referencedProjectConfigurations, DiscoveryPattern[] discoveryPatterns, StaticWebAsset[] assets)
at Microsoft.AspNetCore.Razor.Tasks.GenerateStaticWebAssetsManifest.Execute()
ResultsMonitor.API C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets 411
Furthermore, on the new machine:
If I use JetBrains Rider 2022.1.1 to open the same project, it just builds and runs fine.
If I do a "dotnet build" from the terminal, build also succeeds.
What is wrong with Visual Studio 2022? I even uninstalled and reinstalled Visual Studio 2022 and the .NET 6 SDK for Visual Studio
I'm having build errors using the Debug target button on the Visual Studio IDE but, I can build, run and compile my .NET application using the .NET CLI.
Whenever I tried to Build and compile my application it outputs the following errors
Build started...
1>------ Build started: Project: ContosoCrafts.WebSite, Configuration: Debug Any CPU ------
1>docker exec -i 5ae2fcd24a4aea8e60d8116e279d8fae6fda5a0119c0cc227c89b679557e5fa3 /bin/sh -c "if PID=$(pidof dotnet); then kill $PID; fi"
1>Skipping analyzers to speed up the build. You can execute 'Build' or 'Rebuild' command to run analyzers.
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error :
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CSharp.CSharpCommandLineParser.Parse(IEnumerable`1 args, String baseDirectory, String sdkDirectory, String additionalReferenceDirectories)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CommonCompiler..ctor(CommandLineParser parser, String responseFile, String[] args, BuildPaths buildPaths, String additionalReferenceDirectories, IAnalyzerAssemblyLoader assemblyLoader, GeneratorDriverCache driverCache)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CSharp.CSharpCompiler..ctor(CSharpCommandLineParser parser, String responseFile, String[] args, BuildPaths buildPaths, String additionalReferenceDirectories, IAnalyzerAssemblyLoader assemblyLoader, GeneratorDriverCache driverCache)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.Run(String[] args, BuildPaths buildPaths, TextWriter textWriter, IAnalyzerAssemblyLoader analyzerLoader)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunLocalCompilation(String[] arguments, BuildPaths buildPaths, TextWriter textWriter)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation(IEnumerable`1 originalArguments, BuildPaths buildPaths, TextWriter textWriter, String pipeName)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CommandLine.BuildClient.Run(IEnumerable`1 arguments, RequestLanguage language, CompileFunc compileFunc, CompileOnServerFunc compileOnServerFunc)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.MainCore(String[] args)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error : at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main(String[] args)
1>Done building project "ContosoCrafts.WebSite.csproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Severity Code Description Project File Line Suppression State
Error at Microsoft.CodeAnalysis.CSharp.CSharpCompiler..ctor(CSharpCommandLineParser parser, String responseFile, String[] args, BuildPaths buildPaths, String additionalReferenceDirectories, IAnalyzerAssemblyLoader assemblyLoader, GeneratorDriverCache driverCache) ContosoCrafts.WebSite C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 75
Error ContosoCrafts.WebSite C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 75
Error Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception. ContosoCrafts.WebSite C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 75
Error at Microsoft.CodeAnalysis.CSharp.CSharpCommandLineParser.Parse(IEnumerable`1 args, String baseDirectory, String sdkDirectory, String additionalReferenceDirectories) ContosoCrafts.WebSite C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 75
Error at Microsoft.CodeAnalysis.CommonCompiler..ctor(CommandLineParser parser, String responseFile, String[] args, BuildPaths buildPaths, String additionalReferenceDirectories, IAnalyzerAssemblyLoader assemblyLoader, GeneratorDriverCache driverCache) ContosoCrafts.WebSite C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 75
Error at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.Run(String[] args, BuildPaths buildPaths, TextWriter textWriter, IAnalyzerAssemblyLoader analyzerLoader) ContosoCrafts.WebSite C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 75
Error at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunLocalCompilation(String[] arguments, BuildPaths buildPaths, TextWriter textWriter) ContosoCrafts.WebSite C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 75
Error at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation(IEnumerable`1 originalArguments, BuildPaths buildPaths, TextWriter textWriter, String pipeName) ContosoCrafts.WebSite C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 75
Error at Microsoft.CodeAnalysis.CommandLine.BuildClient.Run(IEnumerable`1 arguments, RequestLanguage language, CompileFunc compileFunc, CompileOnServerFunc compileOnServerFunc) ContosoCrafts.WebSite C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 75
Error at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.MainCore(String[] args) ContosoCrafts.WebSite C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 75
Error at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main(String[] args) ContosoCrafts.WebSite C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets 75
Windows cannot access the file C:\Windows\assembly\NativeImages_v4.0.30319_64\Microsoft.Cbf18da00#\d74596cb5c331cf9892003a6171f0b70\Microsoft.CodeAnalysis.ni.dll for one of the following reasons: there is a problem with the network connection, the disk that the file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program csc because of this error.
Program: csc
File: C:\Windows\assembly\NativeImages_v4.0.30319_64\Microsoft.Cbf18da00#\d74596cb5c331cf9892003a6171f0b70\Microsoft.CodeAnalysis.ni.dll
The error value is listed in the Additional Data section.
User Action
1. Open the file again. This situation might be a temporary problem that corrects itself when the program runs again.
2. If the file still cannot be accessed and
- It is on the network, your network administrator should verify that there is not a problem with the network and that the server can be contacted.
- It is on a removable disk, for example, a floppy disk or CD-ROM, verify that the disk is fully inserted into the computer.
3. Check and repair the file system by running CHKDSK. To run CHKDSK, click Start, click Run, type CMD, and then click OK. At the command prompt, type CHKDSK /F, and then press ENTER.
4. If the problem persists, restore the file from a backup copy.
5. Determine whether other files on the same disk can be opened. If not, the disk might be damaged. If it is a hard disk, contact your administrator or computer hardware vendor for further assistance.
Additional Data
Error value: C000009C
Disk type: 3
Faulting application name: VBCSCompiler.exe, version: 4.100.22.16510, time stamp: 0xabc37d8b
Faulting module name: clr.dll, version: 4.8.4470.0, time stamp: 0x61b72dcc
Exception code: 0xc0000006
Fault offset: 0x00000000000119b6
Faulting process id: 0x60ec
Faulting application start time: 0x01d8523b163e69ea
Faulting application path: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\VBCSCompiler.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: e81cf4dc-e1d5-4710-ba3b-1fcb459e55e6
Faulting package full name:
Faulting package-relative application ID:
What I've tried,
Repair my Visual Studio IDE.
Uninstall and Reinstaill my Visual Studio IDE
Created a new ASP.NET Core Web app project and try to run it... it still gives me build error even if projects just came from templates
Look into Event viewer
I was able to debug to following errors on my Visual studio IDE by reformating my Windows 10 operating system,
I've been working on this project for about a week without any build problem, but suddenly my project fails to build with 0 error showed on the screen, but I found these 2 alerts in the output window. How do I fix this?
#1
warning MSB3277: Found conflicts between different versions of "System.Numerics.Vectors" that
could not be resolved.
2>D:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2202,5):
warning MSB3277: There was a conflict between "System.Numerics.Vectors, Version=2.0.5.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Numerics.Vectors,
Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
2>D:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2202,5):
warning MSB3277: "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and
"System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
was not.
2>D:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2202,5):
warning MSB3277: References which depend on "System.Numerics.Vectors, Version=2.0.5.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [D:\Program Files (x86)\Microsoft References
which depend on "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" [].
2>D:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2202,5):
warning MSB3277:
C:\Users\Lenovo\.nuget\packages\system.text.json\5.0.2\lib\netstandard2.0\System.Text.Json.dll
2>D:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2202,5):
warning
#2
CSC : error CS0006: Metadata file
'C:\Users\Lenovo\source\repos\Project11\Project11\Project11\bin\Debug\
netstandard2.0\ref\Project11.dll' could not be found
I have fixed this issue "CSC : error CS0006: Metadata file
'C:\Users\Lenovo\source\repos\Project11\Project11\Project11\bin\Debug
netstandard2.0\ref\Project11.dll' could not be found"
The Visual Studio did not show me any error, but as I went through PageView one by one, I noticed that one of my "Click_Event_Button" has an incorrect name from the xaml.cs file.
Hope this might help other users who have the same issue.
I have issues while building a UnitTest project using C# from VS 2017
I have the following Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll assemblies on machine
C:>dir /s Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
Volume in drive C has no label.
Volume Serial Number is 3DA9-D3C3
Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow
05/09/2018 11:35 AM 98,864 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
1 File(s) 98,864 bytes
Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\x64
05/09/2018 11:35 AM 98,864 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
1 File(s) 98,864 bytes
Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\TestPlatform
05/29/2018 04:22 PM 89,744 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
1 File(s) 89,744 bytes
Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\PublicAssemblies
05/09/2018 11:35 AM 98,856 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
1 File(s) 98,856 bytes
Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ReferenceAssemblies\v2.0
05/09/2018 11:35 AM 86,848 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
1 File(s) 86,848 bytes
Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ReferenceAssemblies\v4.0
05/09/2018 11:35 AM 98,856 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
1 File(s) 98,856 bytes
Directory of C:\Users\IBM_ADMIN.nuget\packages\microsoft.visualstudio.qualitytools.unittestframework.updated\15.0.26228\lib
06/18/2018 05:16 PM Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
0 File(s) 0 bytes
Directory of C:\Users\IBM_ADMIN.nuget\packages\microsoft.visualstudio.qualitytools.unittestframework.updated\15.0.26228\lib\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
06/13/2017 04:16 PM 98,440 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
1 File(s) 98,440 bytes
Total Files Listed:
7 File(s) 670,472 bytes
1 Dir(s) 43,857,920,000 bytes free
Errors are:
Severity Code Description Project File Line Suppression State
Error Error occurred during processing of assembly 'D:\code\tsm\tdp\agents\mmc\Fm.Common\bin_816\Release\Fm.Common.dll': Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Fm.Common.UnitTests
Severity Code Description Project File Line Suppression State
Error The "BuildShadowTask" task failed unexpectedly.
Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.PublicizeException: Error occurred during processing of assembly 'D:\code\tsm\tdp\agents\mmc\Fm.Common\bin_816\Release\Fm.Common.dll': Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicTypeEmitter.EmitAttachShadow()
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicTypeEmitter..ctor(DynamicType type, ShadowerTargetType targetType)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicType..ctor(DynamicAssembly assembly, TypeBuilder outerType, Type type, TypeCreatorDelegate TypeCreator, ShadowerTargetType targetType)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicAssembly.ShadowType(Type type)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(AppDomain domain, ShadowerOptions options)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(ShadowerOptions options)
at Microsoft.VisualStudio.TestTools.BuildShadowReferences.BuildShadowTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() Fm.Common.UnitTests
Severity Code Description Project File Line Suppression State
Error The "BuildShadowTask" task failed unexpectedly.
Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.PublicizeException: Error occurred during processing of assembly 'D:\code\tsm\tdp\agents\mmc\Fm.Common\bin_816\Release\Fm.Common.dll': Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicTypeEmitter.EmitAttachShadow()
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicTypeEmitter..ctor(DynamicType type, ShadowerTargetType targetType)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicType..ctor(DynamicAssembly assembly, TypeBuilder outerType, Type type, TypeCreatorDelegate TypeCreator, ShadowerTargetType targetType)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicAssembly.ShadowType(Type type)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(AppDomain domain, ShadowerOptions options)
at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(ShadowerOptions options)
at Microsoft.VisualStudio.TestTools.BuildShadowReferences.BuildShadowTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() Fm.Common.UnitTests
I had the same issue, problem was that there was a accessor file used. What is no more supportet by visual Stuio, so I removed it from the csproj file.
<ItemGroup>
<Shadow Include="Test References\Abc.xy.accessor" />
</ItemGroup>
When trying to build my Android project in Xamarin Studio, I keep getting errors like these:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2):
Error: Exception while loading assemblies: System.IO.FileNotFoundException:
Could not load assembly 'Mono.Android.Support.v4, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'.
Perhaps it doesn't exist in the Mono for Android profile?
File name: 'Mono.Android.Support.v4.dll'
at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
at Xamarin.Android.Tasks.ResolveAssemblies.Execute() (Akva20150407)
-
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2):
Error: Exception while loading assemblies: System.IO.FileNotFoundException:
Could not load assembly 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken='.
Perhaps it doesn't exist in the Mono for Android profile?
File name: 'Xamarin.Android.Support.v4.dll'
at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
at Xamarin.Android.Tasks.ResolveAssemblies.Execute() (Akva20150407)
-
C:\progge\Apper\Akva20150407\Akva20150407\Act_MainGUI.cs(29,29):
Error CS0433: The type 'Android.Support.V4.App.FragmentActivity' exists in both
'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v5.0\Mono.Android.Support.v4.dll' and
'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v5.0\Xamarin.Android.Support.v4.dll'
(CS0433) (Akva20150407)
I must add Xamarin.Android.Support.v4 to the MonoAndroid folder, or it will complain that it can't find it.
I must add Mono.Android.Support.v4 to the MonoAndroid folder, or it will complain that it can't find it.
If I add both, it will complain that FragmentActivity can be found in both packages.
The packages were installed via NuGet.
It looks very much self-contradicting.... What on Earth am I supposed to do to get this working??
Upgrade your Xamarin Studio
This bug was fixed in Xamarin Studio: 5.7.0.436.
See bug report: https://bugzilla.xamarin.com/show_bug.cgi?id=24276