Unable to Build in Release mode in Visual Studio - winforms

I am getting below error while try to build in release mode. However it build successfully in debug mode. I use TFS and Visual Studio 2015.
ERROR 1
Severity Code Description Project File Line Suppression State
Error Could not copy "obj\Release\MyTestApp.exe" to
"D:\MyFile\Publish\app.publish\MyTestApp.exe". Exceeded retry count of 10.
Failed. MyTestApp
ERROR 2
Error Unable to copy file "obj\Release\MyTestApp.exe" to
"D:\MyFile\Publish\app.publish\MyTestApp.exe". Could not find a part of the
path 'D:\MyFile\Publish\app.publish'. MyTestApp
Even if I change the path and try to publish it, it still shows the same error message with the paths.

I have often faced this issue when I first compile my solution in debug mode and then in release mode (sometimes).
I am currently using Visual Studio 2019 but this should work for your version as well. You can try following options:
Use Clean & then Rebuild-All Option in Visual Studio
Close & Reopen Visual Studio
If the issue persists then most probably "dotnet.exe" is locking the
files. Use taskkill /im dotnet.exe to kill it; issue should get
resolved
Lastly, open Resource Monitor and check if there are any open handles that
are locking your file. If yes, kill those handles.

Related

Visual Studio Code extensions stopped working suddenly

I'm having problem with my Visual Studio Code. Yesterday I had my pc shut down with VS Code open, and when I turned pc on again, all VS Code extensions stopped working. I'm using React and Typescript in my project and I really need those extensions. My eslint and prettier configurations also stopped working.
If somebody had the same problem please answer.
I had this problem too. You can fix with the following:
Open the command palette (Ctrl + Shift + P)
Run Disable All Installed Extensions
Then run Enable All Extensions.
Restart Visual Studio Code
You can make sure again that the extensions are enabled.
i too had a similar issue, and found (thru trial and error and multiple stackoverflow searches)
fix
toggle Developer Tools once you have vs code open
select the console tab
scroll thru the log, paying close attention to the red errors/
- if it's extension errors, open file explorer and go
$drive:\Users\Yourname.vscode\extensions
delete any problem extensions
Restart VSCode and all should be well (at least for me it was)
cheers and happy coding :)
I had that problem on WSL (Windows Subsystem for Linux). The error was like this:
/mnt/c/Users/Admin/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.13/scripts/wslCode.sh: 69: /home/raul/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9/bin/code: not found
The solution was to go to Windows PowerShell and open Visual Studio Code, then go to the extensions and restart the Remote - WSL extension, and go back to WSL. It then started working immediately.
in my case removing "Todo Tree" plugin which is one of the VS Code plugins solved the problem,
https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree
if it is installed uninstall it and the problem will be solved
It's weird. when I use WSL2 terminal opening Visual Studio Code, an exception occurs, expressing that wslCode.sh: 69.
But when I open Visual Studio Code in Windows, then type code . in WSL2 terminal, it works without an exception.
Please check if you are able to turn on your settings sync. I had an issue like this and I couldn't even access the account option on vs code (the second last icon on the right horizontal panel.
If not (it's a long shot) try uninstalling vs code and reinstalling VS Code completely. I used these commands to do so (works for mac)
This happened to me in the portable version (1.73.3). I deleted the extensions folder {vscode root}/data/extensions. Re-installing all extensions afterwards worked for me

getting the org.eclipse.equinox.p2.core.ProvisionException while installing UX studio software in eclipse

I am trying to install UX_ Studio software in eclipse from the following URl.
http://developer.salesforce.com/media/commercecloud/uxstudio/4.5
This is my home pc
But I am getting the org.eclipse.equinox.p2.core.ProvisionException
The error is as follows:
Unable to read repository at http://developer.salesforce.com/media/commercecloud/uxstudio/4.5/content.xml.
Unable to read repository at http://developer.salesforce.com/media/commercecloud/uxstudio/4.5/content.xml.
Received fatal alert: protocol_version
I checked the error online and added the following line
open the eclipse.ini file and add the following on a separate line under the -vmargs option.
-Djava.net.preferIPv4Stack=true
But exception is still there
Java 8 needs to install with the software. Other versions of java will not work

JVM error while installing clearcase

I am unable to install ClearCase version 8.0.3 in RHEL7.
I have installed all the dependencies, and yet it still shows error.
While doing ./launchpad.sh under the path /Clearcase/Setup/disk1/, it opens in Mozilla and shows the added error.
JVM error while installing clearcase
When I install through /Clearcase/Agent/ with ./install, it installs version 1.7.2 and does not shows list of versions when I click on show all versions.
How can I get pass this error message?
It depends on the exact error you have.
For instance, following this technote, you could see:
launchpad.sh script generates this error:
JVM Terminated. Exit Code=1
Clicking Close on the GUI pop-up window then reports this error:
Error loading: /cc71bin/disk1/InstallerImage_linux/jre_5.0.3.sr8a_20080811b/jre/bin/classic/libjvm.so:
cannot restore segment prot after reloc: Permission denied
That is because:
This might occur if Secure Linux (SELinux) is enabled.
To disable SELinux:
Edit the file /etc/selinux/config.
Change the line "SELINUX=enforcing" to "SELINUX=disable" or "SELINUX=permissive", and then reboot the machine.

Why Installer made with installshield hangs when deployed using ReleaseManagementBuild.exe?

I have a build definition in TFS that compile my code, then using a post build event, I create a Setup.exe file using Installshield.
Using Release Management I am able to deploy the installer to a machine and start the installation process using the tool RunCommandLine, I add the required parameters to the setup.exe so it will install the application silently (using an answer file to avoid user interaction). This process works smoothly!!!
I want to go far, so I tried to launch a release from a gated check-in....change the build template, install the release management client in the build agent, configure my build definition......I performed a small change in my code, then a check-in.....it compiles in the server, and start the release process: deploy the installer and start the installation process using the tool RunCommandLine, I add the required parameters to the setup.exe so it will install the application silently.....but I got a timeout so the release was rejected. I check the machine and found that the setup.exe was still running 0% CPU usage.....very strange.
Checking the build log I found that the command line used by msbuild to launch the release process is something like this:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management\Client\bin\ReleaseManagementBuild.exe -tfs "http://tfs:8080/tfs/Mycollection" -tp "Project1" -bd "Mybuild" -bn "Mybuild_20150623_15.1.0.9" -ts "QA" -nologo
I ran it, and the behavior was the same: the installer got stuck...0% CPU Usage.....Release rejected by timeout.....
So...I open Release Management Client look for the recently created release, and click in the option "Retry failed deployment"....It works!!!! the installer install!!! it does not hangs!!!
I was able to reproduce this behavior several times:
Release launched from Release Management Console......Works
Release launched from ReleaseManagementBuild.exe .......Does not works (Setup.exe hangs)
Any suggestion??

How to install Crystal Reports for .Net 3.5 Winforms application

We have a VB.Net Winforms (x86) application that uses the freely redistributable version of Crystal Reports. Although the application works fine on my test machine, when installing on a client's machine and trying to print a report from the application, the error: The system cannot find the file specified. File name: 'CrystalDecisions.CrystalReports.Engine ... is displayed.
The inno-setup includes the CR redistributable "CRRedist2008_x86.msi" which was installed by the client during the installation. (We also tried running the "CRRedist2008_x64.msi" but received an "unsupported processor type" error).
I have read about Merge Modules that are prerequisites for .NET 1/2 (VS 2002/2005), but cannot find any useful information related to .NET 3.5 and am wondering if these files are still required and how to package and deploy them if they are in fact needed.
Any guidance on how to resolve this installation issue is much appreciated.
Edit
The Inno-Setup contains the following command that checks to see if CR is installed and if not the MSI is launched from the final setup form:
[Run]
Filename: "{app}\CRRedist2008_x86.msi"; Description: "Crystal Reports"; Flags: nowait postinstall skipifsilent; Check: EnsureCrystalReports105Installed();
The problem is that you are not actually executing the MSI file. You can see this by running your installer with /LOG and reviewing the resulting log file.
This is because MSI files cannot be directly executed -- they're data files, not programs.
To resolve this, you need to run msiexec instead, passing the MSI file as a parameter; eg.
[Run]
Filename: {sys}\msiexec.exe; Parameters: "/i ""{app}\CRRedist2008_x86.msi"""; ...
You should review the command line parameters accepted by msiexec and properties accepted by the MSI file to see if you want to do something different, eg. running the install silently instead of interactively.
Also, running it as postinstall is fine if this component is optional for your application and it can gracefully handle it not being installed. If this is not the case then you should treat it as a prerequisite instead and always install it via PrepareToInstall.

Resources