Quantcast
Channel: MSBuild forum
Viewing all articles
Browse latest Browse all 2763

Error MSB4018 task failed unexpectedly

$
0
0

Severity Code Description Project File Line Suppression State
Error MSB4018 The "GetVarsFromMakefile" task failed unexpectedly.
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at InlineCode.GetVarsFromMakefile.Execute() in c:\Users\sl\AppData\Local\Temp\j2i1yum1.0.cs:line 71
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() QtGuiApplication1 C:\Users\sl\AppData\Local\QtMsBuild\qt_vars.targets 246 

Im trying to use Qt and when I create qt gui application in VS2019 , and I write nothing and just run it to check the default things this happens.

header:

#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_QtGuiApplication1.h"
class QtGuiApplication1 : public QMainWindow
{
 Q_OBJECT
public:
 QtGuiApplication1(QWidget *parent = Q_NULLPTR);

private:
 Ui::QtGuiApplication1Class ui;
};

main.cpp

#include "QtGuiApplication1.h"
#include <QtWidgets/QApplication>

int main(int argc, char *argv[])
{
 QApplication a(argc, argv);
 QtGuiApplication1 w;
 w.show();
 return a.exec();
}

projectName.cpp

#include "QtGuiApplication1.h"

QtGuiApplication1::QtGuiApplication1(QWidget *parent)
 : QMainWindow(parent)
{
 ui.setupUi(this);
}

please someone help me.


Viewing all articles
Browse latest Browse all 2763

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>