Visual Studio 2015 Add Publish Version Number - c#

In previous VS versions adding publish version is easy. Just need to go to the project properties -> Publish and specify the publish number as shown in the below figure.
But this is the project properties window from the Visual Studio 2015.
Here I can't find any location to specify the publish version as I did on previous VS versions. So have they dropped this functionality to add publish version numbers or have they moved it to another place??

Try This!
Its free!
https://marketplace.visualstudio.com/items?itemName=PrecisionInfinity.AutomaticVersions
Usage:
To configure Automatic Versions, go to the Tools Menu -> Automatic Versions Settings
Each time you build your project, the versioning will automatically change.
To use the "On Demand" version options, right click on the project and choose "Build New Version"
Hope this helps!

Microsoft deprecated add-ins in Visual Studio 2015 so build number increment add-in is no longer working.
Your possible replacement is VsIncrementer (link)

Related

Unsupported python project in Visual Studio 2017

I had a VS2015 solution with a C# and python project in it. Now I upgraded visual studio to "2017 community preview" version.
If I try to open the solution from Visual Studio by clicking on File/Open/Project... it pops up the following error message:
Unsupported. After that VS cannot open the python project in the solution (it sais "incompatible" next to the project file). It can open the C# projects.
But if I simply double-click on the *.sln file, VS automatically starts up and offers the following one-way upgrade: One-way upgrade. After doing the upgrade it can open the python project as well and everything works properly.
Even though after making the one-way upgrade the first type of opening (from VS) still does not work. Opening by clicking on the solution file still works.
Thanks for any help how I can resolve this issue.
Python tools for visual studio 2017 is only available for the preview version. It will be added soon to the non-preview version.
source: https://blogs.msdn.microsoft.com/pythonengineering/2017/03/07/python-support-in-vs2017/
OMG, I got the answer...
I had both VS 2017 community and VS 2017 community preview installed on my computer. (That is because obvously I installed the simple community version at first, and only installed the other when I realized it does not support python.) I did not either think that preview version will not overwrite the existing one but will make a new install.
So when I click on the sln file it opens up with the preview version of VS, but the shortcut in my start menu refers to the normal version... :S :D

Visual Studio Community 2017 "add package" when pressing Ctrl+Dot

In Visual Studio Community 2015 Update 3, when you have a type that doesn't exist in your project, VS will search the package sources and give "add package xxx" suggestions, like this:
But in VS2017 Community, this feature is gone. Is there any option to turn it on? Or it's totally removed? Why?
It is disabled by default, you need to enable it in VS2017.
From here:
Add using/Imports for types in reference assemblies/NuGet packages –
if you type an unrecognized type, we will search for it in your
reference assemblies and on NuGet.org and offer a quick fix to add the
using/Imports. This feature is off by default; to enable it go to
Tools > Options > Text Editor > [C#/Basic] > Advanced > Suggest usings
for types in reference assemblies and Suggest usings for types in
NuGet packages. Enabling the latter option will download 10 MB of a
NuGet index on your machine and it will take several seconds to
complete (this will not affect your workflow in VS, but it does means
you cannot immediately use the feature once enabling it).

Visual studio doesn't support specific csproj file

I am getting this error when I try to open the solution file of my project. The solution is 2012 file (checked using notepad).
If I click on Ok, The solution opens up except for one csproject which does not load.
I get a migration report in UpgradeLog.htm file, with the following error for the project which failed to load. Could not figure out much from it.
Error:
The application which this project type is based on was not found.
Please try this link for further information:
http://go.microsoft.com/fwlink/?prd=12395&pver=11&sbp=ProjectTypeDeprecated&plcid=0x409&clcid=0x409&ar=MSDN&sar=ProjectCompatibility&o1=82b43b9b-a64c-4715-b499-d71e9ca2bd60
Does the upgrade report mean that it is a project from previous version of Visual studio? It does not open in Visual Studio 2010 either.
The error doesn't say that Visual Studio doesn't support .csproj files at all, it says it doesn't support a specific project type in that particular project file. This means this either isn't your project as you claim, or you are trying to build it on a different machine from the one used to create the project.
Visual Studio uses various elements in a .csproj file to determine its project type. See How do you tell the Visual Studio project type from an existing Visual Studio project and What is the significance of ProjectTypeGuids tag in the visual studio project file. It does this so it knows how to compile your project, what properties tabs to show, what context menu options should be available and so on.
Certain project types can cause this error. Usually they require some kind of SDK to be installed on the machine used to open or build the project.
You should search the web for the GUID mentioned in the error message you show (the value after o1=). You can also open the project file in a text editor and find the <ProjectTypeGuids> elements, which contains comma-separated project type GUIDs.
Then search the web for those GUIDs to find out which SDK or tool you need to install in order to be able to open or build the project.
If you paste the specific GUID from your error message in your favorite web search engine, you'll find Problem solved: Visual Studio / There is a missing project subtype. Subtype: '{82b43b9b-a64c-4715-b499-d71e9ca2bd60}' is unsupported by this installation., where it is mentioned you'll need to install the Visual Studio 2013 SDK. This means that in this case, your project is a Visual Studio 2013 extension.
This is what documentation is for. You should at least put a ReadMe.txt file in your project directory, explaining what the prerequisites for building a project are, especially when it won't open or build with Visual Studio out of the box.
I had this issue when I used Update 5 for VS 2013.
For me I had to click ok and read the next few steps, that popped up. I was initially clicking cancel.
On mine the project was missing Web Tools, so had to reinstall those and once done it was working.
Hope that helps someone.
This issue also appears when trying to import an ASP.Net project into Visual Studio 2015 Express for Desktop, and can be solved by simply downloading and installing Express 2015 for Web - or by using Visual Studio Community/Standard.
I am currently using VS 2017 v 15.7.4. This error came out of no where without any updates on my part. Usually when I have errors like this I just delete the .vs folder in my solution and that clears the problem. In this case that is what I did and the problem was fixed.
Close VS
Delete .vs folder
Load VS
Note: This was for a Xamarin based solution.
I solved this problem by downloading and installing (Microsoft Visual Studio Installer Projects). Close the project then install. After the installation, open your project then reload .csproj file
I had the same issue with VS 2017.
Eventually i solved it by just enable the SSIS in the following way:
1. In VS 2017 - Click on Extensions and Updates in the Tools menu.
Locate the Microsoft Integration Services Projects.
if you can't find it then you will have to install it first.
Click on the Enable button.
Close VS and start it again and SSIS projects are now available.
enter image description here
This (the error that states "Visual studio doesn't support specific csproj file") also occurs when the .vs folder is removed; however, closing and reopening Visual Studio will resolve the error.

MSM Merge Modules in Visual Studio 2013

Could someone please let me know where I might find resources for creating MSM files? While I am able to create MSI files using InstallShield, it seems that Visual Studio no longer supports Merge Module Projects, judging by the link below and the screenshot of my version of Visual Studio 2013 - http://msdn.microsoft.com/en-us/library/z6z02ts5(v=vs.80).aspx
To create a new merge module project:
On the File menu, point to Add, then click New Project.
In the resulting Add New Project dialog box, in the Project types pane, open the Other Project Types node and select Setup and Deployment Projects.
In the Templates pane, choose Merge Module Project.
For those still looking to use Merge Modules in Visual Studio; there is an official Microsoft extension for Visual Studio 2013 that lets you create Merge Module projects again.
Information on the extension, click here. The page leads to the Visual Studio Gallery where you can download the extension
Update 17 Sept 2015: an extension for VS2015 is also available here.
As discussed in the comments, Setup projects got removed from Visual Studio; a version of InstallShield was provided as their replacement. The standard alternative to InstallShield is WiX. WiX is somewhat arcane at first - it's a pretty thin layer over Windows Installer - but there are quite a few resources and examples out there.
Good resources for getting into WiX are http://wix.tramontana.co.hu/ and http://wixtoolset.org/documentation/manual/v3/. You can download the tooling from http://wixtoolset.org/

How do I ensure my winform application deployment overwrites old versions

I have created a msi install package for my project from the VS2008 deployment project. but I am having problems when it comes to upgrading installs, The previously installed version does not get overwritten. How do I ensure that previously installed versions get overwritten?
In Visual Studio select your Setup project within the Solution Explorer
Open the Properties Window
don't right click and select properties.
select View - Properties Window
set RemovePreviousVersions to true
increment the version to a higher number
select yes in the upcoming message box
If you built and deploy this new setup, a setup with an older version number will be deleted.
Important: the setup version number is completely independent from your application or assembly version number!
(Oliver's answer is correct, but I wanted to add pictures and some more details)
Select the setup project in your solution, then open the Properties pane (the tab next to Toolbox):
Make sure DetectNewerInstalledVersion is true (it is be default)
Set InstallAllUsers to true
Set RemovePreviousVersions to true
Update the Version number and hit Enter
After you hit enter, Visual Studio will ask if you want to generate a new GUID for ProductCode, click yes
Additionally, you need to update the version numbers for each project in your solution, because the installer will only replace DLLs if their version number has been incremented:
Open each project's AssemblyInfo.cs and update the AssemblyVersion and AssemblyFileVersion numbers
Or a better way:
Remove AssemblyVersion and AssemblyFileVersion lines from each project's AssemblyInfo.cs
Link to a VersionInfo.cs file in your solution with those 2 lines
Step-by-step for the above: The Right Way To Version Your Assemblies
Right-click on the setup project and select Properties (a different Properties dialog):
Set Windows Installer 4.5 as a Prerequisite instead of the Visual Studio default of Windows Installer 3.1
I'm not sure if all of these steps are necessary, and there may be other ways to set this up, but the above steps work for me.
Windows Installer has built in checks on your files to make sure that the version is higher than the previous version of that file. If it is not, Windows Installer will not overwrite it. For more extensive info on how Windows Installer handles versioning check out this MSDN article:
http://msdn.microsoft.com/en-us/library/aa368599%28VS.85%29.aspx
We need to set REINSTALLMODE property of our msi file to amus.
Following is the link to know more about the meaning of 'amus'
http://msdn.microsoft.com/en-us/library/aa371182%28VS.85%29.aspx
There are two ways to do that.
By using msiexec.exe which comes with .NET SDK (if you have VS 2005 or VS 2008 it will come with it, just browse to command prompt of visual studio and you will find it there)
once you find msiexec.exe just type following command to set REINSTALLMODE property to amus for your installer.
msiexec.exe /i foo.msi REINSTALLMODE=amus

Categories