Can I automatically increment the file build version when using Visual Studio?

In visual Studio 2008, the following works. Find the AssemblyInfo.cs file and find these 2 lines: [assembly: AssemblyVersion(“1.0.0.0”)] [assembly: AssemblyFileVersion(“1.0.0.0”)] You could try changing this to: [assembly: AssemblyVersion(“1.0.*”)] [assembly: AssemblyFileVersion(“1.0.*”)] But this won’t give you the desired result, you will end up with a Product Version of 1.0.* and a File Version of 1.0.0.0. Not … Read more

How to configure Visual Studio to use Beyond Compare

In Visual Studio, go to the Tools menu, select Options, expand Source Control, (In a TFS environment, click Visual Studio Team Foundation Server), and click on the Configure User Tools button. Click the Add button. Enter/select the following options for Compare: Extension: .* Operation: Compare Command: C:\Program Files\Beyond Compare 3\BComp.exe (replace with the proper path … Read more

I want to delete all bin and obj folders to force all projects to rebuild everything

This depends on the shell you prefer to use. If you are using the cmd shell on Windows then the following should work: FOR /F “tokens=*” %%G IN (‘DIR /B /AD /S bin’) DO RMDIR /S /Q “%%G” FOR /F “tokens=*” %%G IN (‘DIR /B /AD /S obj’) DO RMDIR /S /Q “%%G” If you … Read more

This project references NuGet package(s) that are missing on this computer

In my case, I had to remove the following from the .csproj file: <Import Project=”$(SolutionDir)\.nuget\NuGet.targets” Condition=”Exists(‘$(SolutionDir)\.nuget\NuGet.targets’)” /> <Target Name=”EnsureNuGetPackageBuildImports” BeforeTargets=”PrepareForBuild”> <PropertyGroup> <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition=”!Exists(‘$(SolutionDir)\.nuget\NuGet.targets’)” Text=”$([System.String]::Format(‘$(ErrorText)’, ‘$(SolutionDir)\.nuget\NuGet.targets’))” /> … Read more

Visual Studio 2017 error: Unable to start program, An operation is not legal in the current state

For me, the solution (workaround) is to turn off JavaScript debugging on Chrome, which I believe is a new feature introduced in VS 2017. Go to Tools > Options > Debugging > General and turn off the setting for Enable JavaScript Debugging for ASP.NET (Chrome and IE). This is a known issue already, and seems … Read more

Cannot import the keyfile ‘blah.pfx’ – error ‘The keyfile may be password protected’

I was running into this problem as well. I was able to resolve the issue by running sn -i <KeyFile> <ContainerName> (installs key pair into a named container). sn is usually installed as part of a Windows SDK. For example C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\sn.exe. Most likely this location is not on the search … Read more

Found conflicts between different versions of the same dependent assembly that could not be resolved

eta: There’s a killer article on this stuff by SO’s own @Nick Craver that you should read While the other responses say this, they don’t make it explicit, so I will…. On VS2013.2, to actually trigger the emission of the cited information, you need to not read the message, which says: C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning … Read more

How do you force Visual Studio to regenerate the .designer files for aspx/ascx files?

If you open the .aspx file and switch between design view and html view and back it will prompt VS to check the controls and add any that are missing to the designer file. In VS2013-15 there is a Convert to Web Application command under the Project menu. Prior to VS2013 this option was available … Read more

How to stop browser closing automatically when you stop debugging on VS 2017

Visual Studio 2017 version 15.7 and higher & Visual Studio 2019 changed things again. Disabling the following checkboxes will allow you to keep the browser open (doesn’t close after stop debugging) and opens another tab (instead of another window): Tools > Options > Debugging > General Disable “Enable JavaScript debugging for ASP.NET (Chrome, Edge and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)