I have been creating a c# winForm project in Visual Studio 2022 and i have finished it yesterday evening. I tried to build it and got the following error message:
Build started...
1>------ Build started: Project: TestApp, Configuration: Release Any CPU ------
1>TestApp -> C:\Users\Golov\source\repos\TestApp\TestApp\bin\Release\net6.0-windows\TestApp.dll
2>------ Publish started: Project: TestApp, Configuration: Release Any CPU ------
2>TestApp -> C:\Users\Golov\source\repos\TestApp\TestApp\bin\Release\net6.0-windows\TestApp.dll
2>"DestinationFiles" refers to 1 item(s), and "SourceFiles" refers to 4 item(s). They must have the same number of items.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
No clue what it means. I have been looking for where the DestinationFiles and SourceFiles are set, but even with googling i can't find ANY helpfull information.
I made a git repo with the project and really hope someone is able to help me with this.
https://github.com/Golovior/TestApp
Where did i go wrong? And why does it not publish correctly?
Edit:
There must be some windows permission issue to your PublishDir. Try to use another folder. i.e. create a normal folder (Something like C:\testPublish)
<PublishDir>C:\Users\Golov\Documents\widm\Programma's\Test</PublishDir>