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:
#include "ui_QtGuiApplication1.h"
{
Q_OBJECT
QtGuiApplication1(QWidget *parent = Q_NULLPTR);
private:
Ui::QtGuiApplication1Class ui;
};
main.cpp
#include <QtWidgets/QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QtGuiApplication1 w;
w.show();
return a.exec();
}
projectName.cpp
QtGuiApplication1::QtGuiApplication1(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
}
please someone help me.