Visual Studio error building a solution with WPF application - wpf

When I am trying to build a solution file which has WPF projects, I get this error
Could not copy the file "bin\Debug\test.exe.config" because it was not
found.
I tried Clean Solution, Rebuild solution. Tried deleting the bin directory. This started yesterday. Not sure what I changed.
How do I fix this. so I can do a build.

Just a thought, but anti-virus software could potentially cause this type of problem if it decides that your exe is suspicious.
If you have any AV software running, try disabling it temporarily, and/or excluding your project build folders from its protection.

OK. The problem with my solution was a extension(a config Transform extension) that was installed. I updated the Visual studio extension and the build succeeded.

Related

Could not find GeneratedMSBuildEditorConfig.editorconfig during React Native for Windows setup

I am trying to set up my first React Native for Windows project. I followed the steps in this document to install React Native for Windows. I navigated to the location I wanted my new project to be and then used the command
npx react-native init ProjectName
Then I navigated to the new folder ProjectName and used the command
npx react-native-windows-init --language cs --overwrite
After all that finished, I located the Visual Studio solution found inside ProjectName/windows and opened it in Visual Studio 2022. I set it to Debug x64 and tried to run the solution. However, I got the following error:
Could not find a part of the path '[PATH]\ProjectName\node_modules\react-native-windows\Microsoft.ReactNative.Managed.CodeGen\build\x64\Debug\Microsoft.ReactNative.Managed.CodeGen\netcoreapp3.1\win-x64\Microsoft.ReactNative.Managed.CodeGen.GeneratedMSBuildEditorConfig.editorconfig'.
I checked the location indicated, and the .editorconfig file is there, so I don't know why it can't find it, much less what the file is or why it is needed. I ran a search on the project folder and the only reference to this file I could find was in an FileListAbsolute.txt file, so I don't even know where Visual Studio is getting a reference to it. If I do a clean and rebuild on the solution, the build finishes successfully. But if I try to build the solution following that rebuild, or if I simply try to run the solution (regardless of whether I cleaned the solution first), I always get the above error. I've tried searching online for the error, but nothing I find ever has anything to do with my problem.
Why am I getting this error, and how do I resolve it?
I had the same issue and I think, this has to do with VS 2022 only supporting .NET v6+.
So I reinstalled VS 2019, opened the solution in there, set it to x64 and it rebuilt just fine.
Then I could start the project with yarn windows or react-native run-windows respectively.

How do I make my Setup project produce an executable?

I've built a small desktop application with which I am trying to use a Setup project to allow other users to install it. But whenever I run this installer, it does not produce an executable file. This is my first time making a setup project.
My solution contains two projects. One is the setup project which installs the primary output from the other project. The other project is a WPF App that consists of two xaml files, a xaml.cs file for each, an App.config file, and an icon. It also has a few dependencies including one Assembly, two Frameworks, and a handful of Packages. The app works exactly as intended whenever I start a Visual Studio debugging instance on either Debug or Release configurations.
I followed these instructions to build my Setup and deploy my app.
Whenever I ran the resulting Setup, it installed an XML configuration file, a JSON file, a main application dll file, and a bunch of dll files for my assemblies. I looked into some resources on how to run the main dll file properly, only (A) I'm completely stumped by everything I find on that topic, and (B) I would rather just produce an executable file anyway, since I intend for this Setup project to be used by other people and it would be inconvenient to ask said others to jump through the same hoops just to run it.
Why does my Setup project not produce a .exe file? I see that a .exe file is produced in my bin folder whenever I build my project (and this .exe works), so I would think the setup project should also produce one of those, but it doesn't. What am I doing wrong with my Setup project or anything else?
The setup.exe is a bootstrapper over the setup.msi. We can install the content using .msi or by running .exe which inturn runs /gets the data from the msi. To enable setup.exe building, go to solution explorer -> project -> properties -> prerequisites. check the check box on the top "Create setup program to install prerequisite components". apply and rebuld the project. A setup.exe bootstrapper will be created allong with msi.
Switch to Release mode, then rebuild your setup project. If everything went well (check the output console), you'll find an MSI file inside {setup project folder}/bin/Release
In "system file" from your proyect installer, you shoud to add in "Application Folder" the next source = PublishItemsOutpuGroup. In my case functions well.

extjs publish to local pc error could not find part of path

I'm not sure what happened here but I was always able to publish to my local pc for my ExtJs project. Now all of a sudden I am getting this error..
Error Copying file Sencha.sencha\app\app.defaults.json to obj\Release\Package\PackageTmp\Sencha.sencha\app\app.defaults.json failed. Could not find a part of the path 'Sencha.sencha\app\app.defaults.json'. ExtApplication4 0
I think I did upgrade version of ExtJs a while back but not sure this is what caused it.
I also notice the files don't exist when I look at solution explorer.
Any ideas? This is pretty vital to my whole situation.
Did you upgrade Sencha Cmd to 6.5x? This new version does not create the .sencha hidden folder anymore. You error seems to be related to this.

DotNetNuke uninstalling modules and deleting files

I have recently completed Clinton Patterson's guide on DNN module development and was just playing around with the module that I have developed (reinstalling the module, uninstalling the module, etc).
However, some of my source files including View.ascx, Settings.ascx, Edit.ascx, module.css, 00.00.01.SqlDataProvider, Uninstall.SqlProvider, ReleaseNotes.txt, License.txt went missing all of a sudden and is nowhere to be found.
I am not too sure why this is happening but I am suspecting it's due to me uninstalling the module and selecting the "Delete Files?" option when uninstalling. Now I am unable to install the module anymore as all the files mentioned above can't be found in my project anymore.
So my question here is whether my assumption is correct in which I have 'accidentally' deleted my source file when uninstalling the module? And if so, is there any way that I can recover those files because I can't seem to find them anywhere (not even in the recycling bin).
Anyway, shouldn't uninstalling a module deletes those files that were installed and not touch the original source files? Sorry I am rather new to this and I can't really find any similiar questions about this online. Thank you very much!
P.S: I am using DotNetNuke Community Version 07.01.02 if that helps.
Uninstalling the module:
Selecting the 'Delete Files?' option when uninstalling the module:
I don't believe that will remove the files if there's a PROJECT or SOLUTION file in the directory.
It's a safety catch for development environments. I would just manually delete them after you go though the uninstall process.

Rebuild is deleting my .lib

Im trying to merge 2 projects in visual studio and getting a LNK1181 error. I have searched on google and tried everything i came across but i simple cant solve the problem.
I am getting the following results:
Performing a build this succeeds.
Performing a Rebuild it fails with error LNK1181: cannot open input file 'a.dll'
Doing a build the output screen shows the dll is created and it is there in the folder.
Doing a rebuild the output screen shows the dll is created but then it is not in the folder. And then the rebuild results in the fail + the error LNK1181.
So what is wrong? What is different on a rebuild?
I can even see in the folder that the dll is beiing created and then removed again..
*I have 1 project that is the main project and creates the .exe, and it relies on a other project to run.
Solution:
I found the problem and is has nothing to do with the LNK error message i am getting.
Apparently a clean -> build is very different from doing just a rebuild. Mainly because i have multiple projects. When doing a clean -> build is first cleans all the files and then builds all the projects.
But doing a rebuild project A is beiing cleaned and build, then project B is beiing cleaned and build etc..
This way the lib generated bij A is beiing deleted. The solution for this is or just do a clean -> build. Or perform my own clean by deleting the files myself and then do a rebuild.
Also i dont feel like spending to much time on this issue when it is just a MSbuild "problem/bug" and doing a clean build is good enough.
linker error is maybe due to some lib is missing.
firstly check whether you have the lib for a.dll,
then add correct path for the lib in Visual Studio.

Resources