I got this error while building a Qt 5.8 project in Visual Studio 2015 community edition, and am unable to resolve this.
1>------ Rebuild All started: Project: analogclock, Configuration: Debug Win32 ------
1> Generate moc_predefs.h
1> Reading Qt configuration (D:\Qt\Qt5.8.0\5.8\msvc2015\bin\qmake.exe)
1>C:\Users\Dan\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error : The source file for this compilation can be found at:
"C:\Users\Dan\AppData\Local\Temp\25ee8a4c-842c-4329-96bc-cd757b4f3616.txt"
1>C:\Users\Dan\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB3758:
An error has occurred during compilation. warning CS1668: Invalid search path 'Lib\um\x86'
specified in 'LIB environment variable' -- 'The system cannot find the path specified. '
1>C:\Users\Dan\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB3758:
An error has occurred during compilation. c:\Users\Dan\AppData\Local\Temp\qmousnkh.0.cs(88,26) : error CS1061:
'System.Collections.Generic.IEnumerable<string>' does not contain a definition for 'ToHashSet'
and no extension method 'ToHashSet' accepting a first argument of type 'System.Collections.Generic.IEnumerable<string>'
could be found (are you missing a using directive or an assembly reference?)
1>C:\Users\Dan\AppData\Local\QtMsBuild\qt_vars.targets(246,5): error MSB4036:
The "GetVarsFromMakefile" task was not found. Check the following:
1.) The name of the task in the project file is the same as the name of the task class.
2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface.
3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks
files located in the "C:\Program Files\MSBuild\14.0\bin" directory.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
I had the same error and I hope my solution can help you (despite of that almost one year passed from time when you asked:-)) or others having it. Shortly - try to update .Net Framework at least to version 4.7.2.
After some investigation I found that QT VS Tools use pieces of C# code in custom build scripts. One of them is GetVarsFromMakefile in file qt_vars.targets. I copied this code to new C# project, added missing variables and had the same error as during compiling of QT project: 'System.Collections.Generic.IEnumerable' does not contain a definition for 'ToHashSet'... The problem was that this method was added to the mentioned class only at .Net 4.7.2 (https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1?view=netframework-4.7.2) and I had .Net 4.6. Probably during install of newer versions of Visual Studio newer .Net version is installed automatically, but I have VS 2015. After updating to latest .Net version (I tool 4.8) this issue has gone.
Related
I'm trying to compile an app with WinObjC. I'm using Visual Studio 2017 version 15.7.6 and WinObjC prerelease v0.2.180221 from NuGet.
The very first source file it tries to compile, and every subsequent one fails with the error message:
clang.exe : error : unknown or ill-formed Objective-C runtime 'microsoft'
What am I doing wrong?
You seems trying to use side loaded clang compiler, that not gonna work unfortunately, since for WinObjC have been used modified clang with custom ObjectiveC runtime added.
To build your project successfully, you must add latest WinObjC nuget packages of version v0.2.180221-dev-20180516000001 to your project along with this https://www.nuget.org/packages/WinObjC.Compiler/ compiler package, it includes proper clang forked from original clang v6.0.1. Supported VS version is v15.4.5-15.8.9
UPDATE 1
To use latest Visual Studio starting from v15.9 up to the current VS2019 v16.X, you might find useful this topic with guide how to modify your project to make it run.
I have used the command
xamarin-component.exe package C:\cmp\AndroidComponent\component
for creating Xamarin component.While building the Sample android project, it is showing the below error. (I have used the command xamarin-component.exe package C:\cmp\AndroidComponent\component -verbose to display the error message in detail).
Error message:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Bindings.targets(155,2): error MSB3644: The reference assemblies for framework "MonoAndroid,Version=v1.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [C:\cmp\AndroidComponent\component\samples\App17\VidyoClientAndroid\VidyoClientAndroid.csproj]
Note:
I am able to create a Xamarin component for iOS source code successfully. • While creating the Xamarin component for Android source code, internally msbuild.exe is getting called from 64 bit folder(C:\Program Files (x86)\MSBuild\14.0\binamd64\msbuild.exe "/p:Configuration=Release" "C:\cmp\AndroidComponent\component\samples\App17\App17.sln"...). • Build is successful when msbuild.exe is called from path: “C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe”(32 bit) explicitly while building the android project explicity.
I've downloaded the latest copy of xamarin studio which is 6.0 build 3668. I've built a tiny console app and I'm trying to run some unit tests through the UI in xamarin, but I get a message saying that nunit 3.2.1 is unsupported. I have a fake script which does work when run in the terminal.
Full error message is here : Skipped loading assembly test because it references an unsupported version of the nunit.framework, 3.2.1.0.
Can anyone help please ?
I have also faced the problem: "Error CS0246: The type or namespace name 'NUnit' could not be found".
It's because the .dll file is not loaded in the references of the solution.
In my case, I am using Monodevelop/Xamarin Studio 7.8.4,
having multiple NUnit dlls in the monodevelop.UnitTest directory.
Duo to this reason, I had to add reference manually.
As I am using the Ubuntu 18.04 distribution, the nunit.framework.dll assembly was locketed at: usr/lib/monodevelop/Addins/MonoDevelop.UnitTesting/NUnit2/nunitframework.dll
So, I just added this assembly to the my project and the unit test was working fine.
Note: here I have added nunit.framework 2.6.4 assembly.
After updating the VS 2015 Community edition to Update 2 my ASP.NET Web API project fails to build under different environments with weird TypeScript error.
The project is just a plain Web API with no client scripts or whatsoever.
Error details
The "TypeScript.Tasks.FindConfigFiles" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\TypeScript.tasks.dll. Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\TypeScript.tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the 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.
I have same problem, to resolve the problem I just uninstall older version of Typescript (installed with VS2013) and re-install newer version (with VS2015).
I have tried a lot of tutorials regarding configuring opencv 2.2 or 2.3 with MVS 2010 express C++, I tried also uninstall and reinstall my MVS 2010 to sure that it is working. Moreover I also configured it with opencv, like creating property sheets (DEBUG & RELEASE) and then set the Additional dependencies, libraries,includes, etc.
But when trying to run a simple program (Like displayin a video), I get this error:
1>------ Build started: Project: wew, Configuration: Debug Win32 ------
1>TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified.
1>
1>
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Has anybody experienced the same problem and solved it?
I encountered this while installing React Native via npm. I solved it by following the advice in this post: Visual studio doesn't have cl.exe
Visual Studio 2015 doesn't install C++ by default. You have to rerun
the setup, select Modify and then check Programming Language -> C++
I assume it would work for older versions of Visual Studio as well.
I encountered this error today and my problem was that I had accidentally overwritten the "executable directories" part of the project's property pages. I.e. I overwrote the (common properties->VC++ Directories->Executable directories) entry.