Closed eglassman closed 7 years ago
I tried to compile without updating, but then it complained about namespaces, so I thought I'd update.
Updating packages one by one, in reverse order, to see if that helps.
@gustavoasoares, I have brought the Windows VM back up, pulled the newest commit, and got the following error report, which is similar but distinct to what I was getting on my Mac:
From the web, about the first error in this report, I got one of the most helpful things I've gotten so far:
CS0234: Are you missing an assembly reference?
Possible causes for this error include the following:
- An assembly that contains the definition of a type was not referenced in the compilation; use /reference (Import Metadata) to specify the assembly
- You passed a variable name to the typeof operator.
- You tried to reference an assembly that is not part of your target .NET Framework profile. For more information, see Troubleshooting .NET Framework Targeting Errors.
Can you try:
Weirdly, that appears to be a NOP:
Restoring NuGet packages...
All packages are already installed and there is nothing to restore.
Time Elapsed: 00:00:01.5299505
========== Finished ==========
However, I was able to go into the Nuget package manager and trigger 11 updates which it's now trying to install. As a result, I get the same error as I got on the Mac:
We're not the only ones with this annoying error! https://github.com/NuGet/Home/issues/1325 And here: https://stackoverflow.com/questions/34463262/nugets-install-in-visual-studio-2015 And here: https://social.msdn.microsoft.com/Forums/en-US/39d2c5d8-bcfd-4e92-b5ca-9e1c71d85158/could-not-install-package-you-are-trying-to-install-this-package-into-a-project-that-targets?forum=visualstudiogeneral And here: https://stackoverflow.com/questions/34991703/nuget-package-installation-failure which suggests installing this package: https://www.nuget.org/packages/CreateNewNuGetPackageFromProjectAfterEachBuild/
All seems to be related to .NET standard junk: https://blogs.msdn.microsoft.com/dotnet/2016/09/26/introducing-net-standard/
Currently trying to install updates on Windows VM installation of VS 2017, then will look into this Create-New-NuGet-Package thing to get around the .NET issue.
Current build error for Refazer.WebAPI project on VS Community 2017 for Mac:
Building: Refazer.WebAPI (Debug)
Build started 6/22/2017 2:38:33 PM.
__________________________________________________
Project "/Users/elenaglassman/Gitrepos/gustavo-refazer/Tutor/Refazer.csproj" (Build target(s)):
Target ResolveAssemblyReferences:
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: The "ResolveAssemblyReference" task failed unexpectedly.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: System.InvalidOperationException: PE image does not have metadata.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryItems (Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00021] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:496
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure (Microsoft.Build.Tasks.DependentAssembly[] remappedAssembliesValue, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00012] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:1633
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute (Microsoft.Build.Shared.FileExists fileExists, Microsoft.Build.Shared.DirectoryExists directoryExists, Microsoft.Build.Tasks.GetDirectories getDirectories, Microsoft.Build.Tasks.GetAssemblyName getAssemblyName, Microsoft.Build.Tasks.GetAssemblyMetadata getAssemblyMetadata, Microsoft.Build.Shared.GetRegistrySubKeyNames getRegistrySubKeyNames, Microsoft.Build.Shared.GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, Microsoft.Build.Tasks.GetLastWriteTime getLastWriteTime, Microsoft.Build.Tasks.GetAssemblyRuntimeVersion getRuntimeVersion, Microsoft.Build.Shared.OpenBaseKey openBaseKey, Microsoft.Build.Tasks.GetAssemblyPathInGac getAssemblyPathInGac, Microsoft.Build.Tasks.IsWinMDFile isWinMDFile, Microsoft.Build.Tasks.ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader) [0x004d3] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2140
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2903
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:632
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00249] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787
Done building target "ResolveAssemblyReferences" in project "Refazer.csproj" -- FAILED.
Done building project "Refazer.csproj" -- FAILED.
Build FAILED.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: The "ResolveAssemblyReference" task failed unexpectedly.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: System.InvalidOperationException: PE image does not have metadata.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryItems (Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00021] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:496
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure (Microsoft.Build.Tasks.DependentAssembly[] remappedAssembliesValue, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00012] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:1633
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute (Microsoft.Build.Shared.FileExists fileExists, Microsoft.Build.Shared.DirectoryExists directoryExists, Microsoft.Build.Tasks.GetDirectories getDirectories, Microsoft.Build.Tasks.GetAssemblyName getAssemblyName, Microsoft.Build.Tasks.GetAssemblyMetadata getAssemblyMetadata, Microsoft.Build.Shared.GetRegistrySubKeyNames getRegistrySubKeyNames, Microsoft.Build.Shared.GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, Microsoft.Build.Tasks.GetLastWriteTime getLastWriteTime, Microsoft.Build.Tasks.GetAssemblyRuntimeVersion getRuntimeVersion, Microsoft.Build.Shared.OpenBaseKey openBaseKey, Microsoft.Build.Tasks.GetAssemblyPathInGac getAssemblyPathInGac, Microsoft.Build.Tasks.IsWinMDFile isWinMDFile, Microsoft.Build.Tasks.ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader) [0x004d3] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2140
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2903
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:632
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00249] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.03
and for Refazer.Experiments:
Building: Refazer.Experiments (Debug)
Build started 6/22/2017 2:40:45 PM.
__________________________________________________
Project "/Users/elenaglassman/Gitrepos/gustavo-refazer/Tutor/Refazer.csproj" (Build target(s)):
Target ResolveAssemblyReferences:
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: The "ResolveAssemblyReference" task failed unexpectedly.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: System.InvalidOperationException: PE image does not have metadata.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryItems (Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00021] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:496
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure (Microsoft.Build.Tasks.DependentAssembly[] remappedAssembliesValue, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00012] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:1633
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute (Microsoft.Build.Shared.FileExists fileExists, Microsoft.Build.Shared.DirectoryExists directoryExists, Microsoft.Build.Tasks.GetDirectories getDirectories, Microsoft.Build.Tasks.GetAssemblyName getAssemblyName, Microsoft.Build.Tasks.GetAssemblyMetadata getAssemblyMetadata, Microsoft.Build.Shared.GetRegistrySubKeyNames getRegistrySubKeyNames, Microsoft.Build.Shared.GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, Microsoft.Build.Tasks.GetLastWriteTime getLastWriteTime, Microsoft.Build.Tasks.GetAssemblyRuntimeVersion getRuntimeVersion, Microsoft.Build.Shared.OpenBaseKey openBaseKey, Microsoft.Build.Tasks.GetAssemblyPathInGac getAssemblyPathInGac, Microsoft.Build.Tasks.IsWinMDFile isWinMDFile, Microsoft.Build.Tasks.ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader) [0x004d3] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2140
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2903
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:632
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00249] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787
Done building target "ResolveAssemblyReferences" in project "Refazer.csproj" -- FAILED.
Done building project "Refazer.csproj" -- FAILED.
Build FAILED.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: The "ResolveAssemblyReference" task failed unexpectedly.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: System.InvalidOperationException: PE image does not have metadata.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryItems (Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00021] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:496
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure (Microsoft.Build.Tasks.DependentAssembly[] remappedAssembliesValue, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00012] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:1633
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute (Microsoft.Build.Shared.FileExists fileExists, Microsoft.Build.Shared.DirectoryExists directoryExists, Microsoft.Build.Tasks.GetDirectories getDirectories, Microsoft.Build.Tasks.GetAssemblyName getAssemblyName, Microsoft.Build.Tasks.GetAssemblyMetadata getAssemblyMetadata, Microsoft.Build.Shared.GetRegistrySubKeyNames getRegistrySubKeyNames, Microsoft.Build.Shared.GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, Microsoft.Build.Tasks.GetLastWriteTime getLastWriteTime, Microsoft.Build.Tasks.GetAssemblyRuntimeVersion getRuntimeVersion, Microsoft.Build.Shared.OpenBaseKey openBaseKey, Microsoft.Build.Tasks.GetAssemblyPathInGac getAssemblyPathInGac, Microsoft.Build.Tasks.IsWinMDFile isWinMDFile, Microsoft.Build.Tasks.ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader) [0x004d3] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2140
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2903
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:632
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00249] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.02
---------------------- Done ----------------------
Build: 1 error, 0 warnings
Uninstalled all codeanalysis packages. (There were multiple listed in the project, and some depended on each other; I deleted all of them.) Tried to reinstall the Microsoft.CodeAnalysis nuget package and received the same error as before:
Attempting to gather dependency information for package 'Microsoft.CodeAnalysis.2.2.0' with respect to project 'Refazer', targeting '.NETFramework,Version=v4.5.2'
GET https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis/index.json
OK https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis/index.json 316ms
GET https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.csharp.workspaces/index.json
GET https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.visualbasic.workspaces/index.json
GET https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.csharp/index.json
GET https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.workspaces.common/index.json
GET https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.visualbasic/index.json
GET https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.common/index.json
GET https://api.nuget.org/v3/registration2-gz/microsoft.composition/index.json
GET https://api.nuget.org/v3/registration2-gz/system.collections.immutable/index.json
GET https://api.nuget.org/v3/registration2-gz/system.reflection.metadata/index.json
GET https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.analyzers/index.json
OK https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.csharp.workspaces/index.json 485ms
OK https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.visualbasic.workspaces/index.json 510ms
OK https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.csharp/index.json 769ms
OK https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.workspaces.common/index.json 769ms
GET https://api.nuget.org/v3/registration2-gz/system.objectmodel/index.json
GET https://api.nuget.org/v3/registration2-gz/system.threading.tasks.parallel/index.json
GET https://api.nuget.org/v3/registration2-gz/system.text.regularexpressions/index.json
GET https://api.nuget.org/v3/registration2-gz/system.linq.parallel/index.json
GET https://api.nuget.org/v3/registration2-gz/system.diagnostics.contracts/index.json
OK https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.visualbasic/index.json 1032ms
OK https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.common/index.json 1093ms
GET https://api.nuget.org/v3/registration2-gz/microsoft.diasymreader.native/index.json
GET https://api.nuget.org/v3/registration2-gz/microsoft.bcl.metadata/index.json
GET https://api.nuget.org/v3/registration2-gz/microsoft.bcl.immutable/index.json
OK https://api.nuget.org/v3/registration2-gz/microsoft.composition/index.json 1272ms
GET https://api.nuget.org/v3/registration2-gz/system.composition/index.json
OK https://api.nuget.org/v3/registration2-gz/system.reflection.metadata/index.json 1404ms
OK https://api.nuget.org/v3/registration2-gz/system.collections.immutable/index.json 1669ms
OK https://api.nuget.org/v3/registration2-gz/microsoft.codeanalysis.analyzers/index.json 1685ms
OK https://api.nuget.org/v3/registration2-gz/system.threading.tasks.parallel/index.json 1251ms
OK https://api.nuget.org/v3/registration2-gz/system.text.regularexpressions/index.json 1251ms
GET https://api.nuget.org/v3/registration2-gz/system.runtime/index.json
GET https://api.nuget.org/v3/registration2-gz/system.collections/index.json
GET https://api.nuget.org/v3/registration2-gz/system.threading/index.json
GET https://api.nuget.org/v3/registration2-gz/system.resources.resourcemanager/index.json
GET https://api.nuget.org/v3/registration2-gz/system.runtime.extensions/index.json
GET https://api.nuget.org/v3/registration2-gz/system.collections.concurrent/index.json
GET https://api.nuget.org/v3/registration2-gz/system.globalization/index.json
GET https://api.nuget.org/v3/registration2-gz/system.threading.tasks/index.json
OK https://api.nuget.org/v3/registration2-gz/system.objectmodel/index.json 1565ms
OK https://api.nuget.org/v3/registration2-gz/system.diagnostics.contracts/index.json 1564ms
GET https://api.nuget.org/v3/registration2-gz/system.diagnostics.debug/index.json
OK https://api.nuget.org/v3/registration2-gz/microsoft.bcl.metadata/index.json 1567ms
OK https://api.nuget.org/v3/registration2-gz/system.linq.parallel/index.json 1921ms
GET https://api.nuget.org/v3/registration2-gz/system.linq/index.json
OK https://api.nuget.org/v3/registration2-gz/microsoft.diasymreader.native/index.json 1927ms
OK https://api.nuget.org/v3/registration2-gz/microsoft.bcl.immutable/index.json 1927ms
GET https://api.nuget.org/v3/registration2-gz/validation/index.json
OK https://api.nuget.org/v3/registration2-gz/system.runtime/index.json 1390ms
OK https://api.nuget.org/v3/registration2-gz/system.composition/index.json 2193ms
GET https://api.nuget.org/v3/registration2-gz/system.composition.attributedmodel/index.json
GET https://api.nuget.org/v3/registration2-gz/system.composition.hosting/index.json
GET https://api.nuget.org/v3/registration2-gz/system.composition.convention/index.json
GET https://api.nuget.org/v3/registration2-gz/system.composition.runtime/index.json
GET https://api.nuget.org/v3/registration2-gz/system.composition.typedparts/index.json
OK https://api.nuget.org/v3/registration2-gz/system.threading/index.json 1665ms
OK https://api.nuget.org/v3/registration2-gz/system.resources.resourcemanager/index.json 1958ms
OK https://api.nuget.org/v3/registration2-gz/system.runtime.extensions/index.json 2272ms
OK https://api.nuget.org/v3/registration2-gz/system.collections/index.json 2304ms
OK https://api.nuget.org/v3/registration2-gz/system.globalization/index.json 2501ms
OK https://api.nuget.org/v3/registration2-gz/system.collections.concurrent/index.json 2531ms
GET https://api.nuget.org/v3/registration2-gz/system.diagnostics.tracing/index.json
OK https://api.nuget.org/v3/registration2-gz/system.threading.tasks/index.json 2862ms
OK https://api.nuget.org/v3/registration2-gz/system.diagnostics.debug/index.json 2586ms
GET https://api.nuget.org/v3/registration2-gz/system.threading.tasks.unofficial/index.json
OK https://api.nuget.org/v3/registration2-gz/system.linq/index.json 2517ms
OK https://api.nuget.org/v3/registration2-gz/validation/index.json 2165ms
GET https://api.nuget.org/v3/registration2-gz/system.diagnostics.tools/index.json
GET https://api.nuget.org/v3/registration2-gz/system.reflection/index.json
OK https://api.nuget.org/v3/registration2-gz/system.composition.hosting/index.json 2119ms
OK https://api.nuget.org/v3/registration2-gz/system.composition.convention/index.json 2122ms
OK https://api.nuget.org/v3/registration2-gz/system.composition.runtime/index.json 2430ms
OK https://api.nuget.org/v3/registration2-gz/system.composition.attributedmodel/index.json 2432ms
OK https://api.nuget.org/v3/registration2-gz/system.composition.typedparts/index.json 2740ms
OK https://api.nuget.org/v3/registration2-gz/system.diagnostics.tracing/index.json 1553ms
OK https://api.nuget.org/v3/registration2-gz/system.threading.tasks.unofficial/index.json 1553ms
OK https://api.nuget.org/v3/registration2-gz/system.diagnostics.tools/index.json 1290ms
OK https://api.nuget.org/v3/registration2-gz/system.reflection/index.json 1552ms
GET https://api.nuget.org/v3/registration2-gz/system.io/index.json
GET https://api.nuget.org/v3/registration2-gz/system.reflection.primitives/index.json
OK https://api.nuget.org/v3/registration2-gz/system.io/index.json 353ms
OK https://api.nuget.org/v3/registration2-gz/system.reflection.primitives/index.json 354ms
GET https://api.nuget.org/v3/registration2-gz/system.text.encoding/index.json
OK https://api.nuget.org/v3/registration2-gz/system.text.encoding/index.json 299ms
Total number of results gathered : 105
Gathering dependency information took 7.89 sec
Summary of time taken to gather dependencies per source :
https://api.nuget.org/v3/index.json - 1.17 min
/Users/elenaglassman/Gitrepos/gustavo-refazer/packages - 352.03 ms
Attempting to resolve dependencies for package 'Microsoft.CodeAnalysis.2.2.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.CodeAnalysis.2.2.0'
Resolved actions to install package 'Microsoft.CodeAnalysis.2.2.0'
Retrieving package 'Microsoft.CodeAnalysis 2.2.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.Common 2.2.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.CSharp 2.2.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.CSharp.Workspaces 2.2.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.VisualBasic 2.2.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.VisualBasic.Workspaces 2.2.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.Workspaces.Common 2.2.0' from 'nuget.org'.
For adding package 'Microsoft.CodeAnalysis.Common.2.2.0' to project 'Refazer' that targets 'net452'.
Install failed. Rolling back...
Package 'Microsoft.CodeAnalysis.Common.2.2.0' does not exist in project 'Refazer'
Package 'Microsoft.CodeAnalysis.Common.2.2.0' does not exist in folder '/Users/elenaglassman/Gitrepos/gustavo-refazer/packages'
Executing nuget actions took 106.78 ms
Could not install package 'Microsoft.CodeAnalysis.Common 2.2.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Another relevant link from googling the error message: https://github.com/dotnet/roslyn/issues/18954
Roslyn appears to be the name of the project on github that includes the nuget package for Microsoft's CodeAnalysis.
Highlights of that conversation: Complaint
I next tried to create a File>New>C#>ClassLibrary (i.e. a standard desktop framework class library)
and install a NuGet reference to Microsoft.CodeAnalysis. The NuGet installation failed because it
said it couldn't find anything compatible with this target. I tried a few different target frameworks
(40, 45, 452, 47) and got the same error on all of them.
...
Eventually by blind luck I picked .NET Framework 4.6 and it seems to have worked.
Response from Roslyn author/maintainer? (presumably at MS):
Analyzers only work on .NET Framework 4.6 and newer
The maintainer in the conversation I quoted above does acknowledge that this entire issue may be a bug on their end.
It was unclear how to force our solution to use .NET Framework 4.6. I manually changed all instances of 4.5.2 to 4.6 in my local copy of the code, uninstalled all packages that include or depend on CodeAnalysis, cleaning, rebuilding, etc. but it still tried to use 4.5.2 as a target.
Then I found this option and updated it to 4.6 for every project in the solution:
This step, above, worked!!!! I am a genius!!! haha, jk @gustavoasoares
Microsoft.CodeAnalysis successfully added.
Okay, still cannot build without errors, but I feel we have made progress:
Building: Refazer.WebAPI (Debug)
Build started 6/22/2017 4:07:56 PM.
__________________________________________________
Project "/Users/elenaglassman/Gitrepos/gustavo-refazer/Tutor/Refazer.csproj" (Build target(s)):
Target ResolveAssemblyReferences:
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: The "ResolveAssemblyReference" task failed unexpectedly.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: System.InvalidOperationException: PE image does not have metadata.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryItems (Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00021] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:496
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure (Microsoft.Build.Tasks.DependentAssembly[] remappedAssembliesValue, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00012] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:1633
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute (Microsoft.Build.Shared.FileExists fileExists, Microsoft.Build.Shared.DirectoryExists directoryExists, Microsoft.Build.Tasks.GetDirectories getDirectories, Microsoft.Build.Tasks.GetAssemblyName getAssemblyName, Microsoft.Build.Tasks.GetAssemblyMetadata getAssemblyMetadata, Microsoft.Build.Shared.GetRegistrySubKeyNames getRegistrySubKeyNames, Microsoft.Build.Shared.GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, Microsoft.Build.Tasks.GetLastWriteTime getLastWriteTime, Microsoft.Build.Tasks.GetAssemblyRuntimeVersion getRuntimeVersion, Microsoft.Build.Shared.OpenBaseKey openBaseKey, Microsoft.Build.Tasks.GetAssemblyPathInGac getAssemblyPathInGac, Microsoft.Build.Tasks.IsWinMDFile isWinMDFile, Microsoft.Build.Tasks.ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader) [0x004d3] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2140
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2903
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:632
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00249] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787
Done building target "ResolveAssemblyReferences" in project "Refazer.csproj" -- FAILED.
Done building project "Refazer.csproj" -- FAILED.
Build FAILED.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: The "ResolveAssemblyReference" task failed unexpectedly.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: System.InvalidOperationException: PE image does not have metadata.
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryItems (Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00021] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:496
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure (Microsoft.Build.Tasks.DependentAssembly[] remappedAssembliesValue, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.ArrayList exceptions) [0x00012] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ReferenceTable.cs:1633
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute (Microsoft.Build.Shared.FileExists fileExists, Microsoft.Build.Shared.DirectoryExists directoryExists, Microsoft.Build.Tasks.GetDirectories getDirectories, Microsoft.Build.Tasks.GetAssemblyName getAssemblyName, Microsoft.Build.Tasks.GetAssemblyMetadata getAssemblyMetadata, Microsoft.Build.Shared.GetRegistrySubKeyNames getRegistrySubKeyNames, Microsoft.Build.Shared.GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, Microsoft.Build.Tasks.GetLastWriteTime getLastWriteTime, Microsoft.Build.Tasks.GetAssemblyRuntimeVersion getRuntimeVersion, Microsoft.Build.Shared.OpenBaseKey openBaseKey, Microsoft.Build.Tasks.GetAssemblyPathInGac getAssemblyPathInGac, Microsoft.Build.Tasks.IsWinMDFile isWinMDFile, Microsoft.Build.Tasks.ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader) [0x004d3] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2140
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs:2903
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:632
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00249] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.02
---------------------- Done ----------------------
Build: 1 error, 0 warnings
More screenshots of errors:
In parallel, I have updated the targets (using the GUI) for each of 4 projects, and now I'm getting this error when I build one of the projects:
I am trying an "Incredibuild" just in case that helps haha
Thanks @eglassman! It seems there is a problem because VS 2017 uses Nuget 4.x, which does not use package.config to configure the dependences. On windows, VS 2017, can you try to download the latest code from the master branch, and then build the solution? I still need to refactor Refazer.Web from nuget 2.x to nuget 4.x. So you need to manually restore the packages for this project. You can download nuget.exe (https://dist.nuget.org/index.html), go to refazer/package folder, and run: path-to-nuget.exe\nuget.exe install ..\Refazer.Web\packages.config
Please let me know if this works.
Updating my Windows VM and will follow your instructions ASAP.
@gustavoasoares still buggy :/
Whoops, I forgot to manually restore the packages. Will do that now!
On Sun, Jun 25, 2017, 6:42 PM Gustavo Soares notifications@github.com wrote:
Thanks @eglassman https://github.com/eglassman! It seems there is a problem because VS 2017 uses Nuget 4.x, which does not use package.config to configure the dependences. On windows, VS 2017, can you try to download the latest code from the master branch, and then build the solution? I still need to refactor Refazer.Web from nuget 2.x to nuget 4.x. So you need to manually restore the packages for this project. You can download nuget.exe (https://dist.nuget.org/index.html), go to refazer/package folder, and run: path-to-nuget.exe\nuget.exe install ..\Refazer.Web\packages.config
Please let me know if this works.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/gustavoasoares/refazer/issues/20#issuecomment-310944125, or mute the thread https://github.com/notifications/unsubscribe-auth/ACNnQviXVUHtpC41hqD2ZUjvYd0jOuU9ks5sHwxmgaJpZM4OBogw .
Ran command, got the following:
C:\Users\eglassman\Source\Repos\refazer>nuget.exe install \Refazer.Web\packages.config
Feeds used:
C:\Users\eglassman\.nuget\packages\
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
All packages listed in C:\Refazer.Web\packages.config are already installed.
@gustavoasoares I used the VS2017 GUI for uninstalling packages for all the projects in the solution, but I still get the same error. :/
There's relevant information here for a nuget package concole command-line way to uninstall: https://docs.microsoft.com/en-us/nuget/consume-packages/reinstalling-and-updating-packages
However, I don't see how this should be any different from the GUI.
Clean clone of repo, built Solution straight away, got the following error about packages:
Ran \refazer\packages>nuget.exe install ..\Tutor\packages.config
then rebuilt Solution and got the following errors:
Ran \refazer\packages>nuget.exe install ..\Refazer.Web\packages.config
and then rebuilt Solution and got the following errors:
that image, annotated:
Ok. We are almost there. You should not have run this command:
After trying to update my packages, I got the following error:
@gustavoasoares, what .NETFramework version do you have?