I have a C# solution in Visual Studio 2015 with two projects, the applications run perfectly on Win 7 and up however, they will not run on XP. I've done the mandatory research and seen that I need to update my Platform Toolset setting and include a few dlls, however, when trying to follow the steps (as listed on this site and MS's) I do not see the options for configuring this.
An similar question on this site showed a screenshot with an example but when I try to navigate to the configuration options for this project (not solution) I do not see the "Platform Toolset" setting, much less anything else shown on the example.
Firstly, viewing the property pages of one of the projects shows an entirely different UI with no "Configuration Properties" and the only way for me to view a form similar to the example is to view the properties of the entire solution (against MS instructions)
Example
My Project Property Page
My Solution Properties
As you would see, the dialog does not offer a "General" tab and neither of the projects within the solution have the ability to view the configurations.
I've inherited this application and am not sure what was done during the creation of the solution and projects that may have caused this. Any ideas? Is there something that was done incorrectly?
Your example is from a C++ project, whereas your project is a C# project, hence why the two look completely different.
Windows XP does not support .NET 4.5, so you will have to downgrade to an earlier version of .NET (Source).
The drop-down to do this is clearly displayed in your "My Project Property Page" screenshot (labelled as "Target Framework"). The latest supported version for XP is .NET 4.
It is worth noting that Windows XP is no longer supported by Microsoft (unless you are paying for extended support - and even that runs out in a year or so). It is not recommended that it is used.
Related
I have coworkers, who work on Visual Studio 2015, I have VS2019 and we share code through TFS.
When I make some changes everything works, but when I push code to server my coworkers cannot build the project because they have errors resulting from the fact that VS allows me new C# functionalities like internal functions, inline declarations etc. Is there a way to configure my VS so that it only lets me do the things it allows them to do? I honestly don't have any point where I can start looking into this topic.
You can choose the language version, it may solve some of your issues
I believe 20127 will be locked at C# 7.3, as shown here C Sharp (programming language)
To choose the C# language version for your projects, in the Solution Explorer
right-click on the project and select Properties
Select Build Tab
Then Select Advanced button.
This will bring up the Advanced Build Settings windows, where you can check the drop-down option for “Language Version” of your choice
Usually, you would set this to latest major or minor, though you your case you would likely choose C# 7 - 7.3, which would be compatible with 2017.
Image is for illustrative purpose only
Very relevant comments by JonasH
The langversion will be saved in the csproj file, so it should be
sufficient if it is done once. Also, the language selection dropdown
is disabled in the latest version of vs2019, but you may still edit
the csproj by hand to add it.
I'm using VS2019 under Windows 10 and I'm trying to figure out how to compile for the non-Windows platforms. I'm aware that only some languages support cross-compilation (C# being one of them). So I decided to start off with one of Microsoft's own examples (the Console App for .NET Core). When asking VS2019 to create the Console project, it shows me various image icons which suggest that it'll be buildable for Windows, Linux and macOS - but no matter what I do, I can only make it build the Windows target.
After a bit of research I realized that I need to add this line to my C# project file:-
<RuntimeIdentifiers>win10-x64;osx.10.11-x64;ubuntu.16.10-x64</RuntimeIdentifiers>
but even after adding that line (and re-loading / re-building the project) it staunchly refuses to build anything apart from the Windows target. Over on CodeGuru, one of the devs there tried it for me (under VS2017) and managed to make it work - but I've tried it in VS2019 and also VS2015 and I can't make it work in either of them. Any ideas what I might be doing wrong??
[Edit...]
Thanks Magnetron - if I press Build->Publish I see a totally different dialog from the one you're seeing (and it's the same in both VS2015 and VS2019):-
Even if I follow the Next or Finish buttons I never see the Create Profile option :(
Go to Build > Publish, select Folder and click on Create Profile
Then Click on Edit and change the Deployment Mode to Self-contained. At last, you can specify the target OS in Target Runtime
You can create multiple profiles for each OS, and publish each one individualy as needed.
Edit:
The posted publish dialog is for a .Net Framework Console app, not an .Net Core one. The .Net framework is Windows only, you have to create your project as a .Net Core
Woohoo!! I just ran the VS2019 installer to remind myself how to uninstall (in preparation for tomorrow) and it told me there's already a 16.3.5 available. 16.3.4 only got installed a few hours ago but for the hell of it, I figured I might as well try the newer version - and it's now working !!!
Is anyone out there using Visual Studio 2015 and 2017 .CSPROJ files alongside each other in the same folder? Are there any other incompatibilites, besides the solution and project files that I should worry about?
Basically what I want to do is allow our developers to continue to use VS2015 and those projects -- just for a while -- while all still working on exact same set of same code files. I don't want to move/change anything else.
I've already created all the new project files and solution file. But 'm wondering if I can just put them in the same physical disk folder alongside each other and have everyone go merrily about their development tasks with either VS2015 or VS2017.
The duplication of work synchronizing the project files themselves is not a concern. I just want to make sure there aren't any OTHER format differences that might cause some sort of build/run problem for me.
Is anyone else out out there doing this? Is this workable?
There is not any incompatibility, but you should check when you are creating a new project in VS2017 the kind of project, you should have two things in mind, first, when you are creating .net projects, you have to keep using the old .net framework instead of .net core, and second (only if you are going to create desktop/libraries/console projects), you need to use the Common option instead the new option (check on the dropdown to select the .net framework version that allows you to select versions lower than 4.5), cause if not, then you have the incorrect kind of project selected and this kind of project doesn't work in VS2015 as they change the structure of the .csproj file. Hope this little explanation helps you.
Update
What I wanted to say with this explanation is that every projects that comes from VS2015 or 2017 if they have the same structure (same old kind of .net framework), then you can do what you want to do, but if for some reason you need to make a .net core, then this will not work.
Cheers.
Just be aware that VS2017 supports C# language version features that 2015 does not. If anyone uses those features you will not be able to build the projects in VS 2015.
You can enforce language version in the .csproj files but this is done per BuildConfiguration and can be tedious to configure for larger solutions with many projects.
To make the changes
Right click the Project and select Properties
Then Build Then
Advanced (Bottom Right corner) General > Language Version
Change to C#6.0
Overall it is possible but you may need to retain VS2015 if you have any SSIS or SSRS packages as the tooling is still not available for general release (Oct 17) and is still in preview.
You should be able to run Visual Studio 2015 and Visual Studio 2017 side by side without any issues. Our application ran on both Visual Studio 2015 and Visual Studio 2017 before every developer migrated to VS 2017.
You do need to keep in mind few things though:
Visual Studio 2017 by supports C# 7.0. Make sure that you use same language version in both the IDEs.
VS 2017 also supports stuff like editor.config. I would suggest to avoid using it (though I feel it should not be an issue)
If you are using on .NET Core project without csproj. Do not think you would be able to upgrade it.
How to prevent updating certain telerik dlls in Visual Studio 2013?
I am trying to prevent Telerik.Web.UI.dll from upgrading to a different version with a different version timestamp because I have some legacy code that is causing issues so sticking with the existing version is preferable. The same issue existing for Telerik.Web.UI.Skins.dll with the same version numbers (see below).
Working version is 2011.3.1305.35 and the Non-Working version is 2015.3.1111.45
I don't know if I need to load the 2011 version on my computer and also have the 2015 version in the toolbox at the same time to make it an optional compile.
Is it also possible to prevent this from updating when I first load up the visual studio project? Finally is it possible to keep the current version of Telerik control panel settings and without reverting to older version of the control panel just keep current settings?
To fix for my case: Right Click the Project in solution explorer that contains the dlls. Then Update the Property Pages by removing the "Auto Update" versions for both Telerik.Web.UI.dll and Telerik.Web.UI.Skins.dll by selecting them and then hitting the "Remove" button under the Reference section which should be the top most section in "Property Pages".
This would probably work for any dll that is automatically updating when opening visual studio or hitting the compile button. By removing the "Auto Update" version of type BIN for these two reference dlls, it essentially leaves theme alone when building the project.
I'll have to test these with regard to the Telerik Control Panel to see how and when it updates the references section.
I don't see the properties that you refer to in my copy of VS2013 (perhaps we use different types of projects) but I had posed this question to the folks at Telerik before.
What I was trying to do was to have a network folder store very tightly controlled copies of the Telerik libraries as my application was being tested against those versions and I didn't want anything changing.
However I also wanted to keep up to date for other projects and to evaluate bug fixes. When I received updates to those libraries, I would install the updates using the Telerik installer (and leave them there, which is the problem), and then VS2013 would find the files in the GAC and update my project's references to those versions when I re-opened a project.
The response from the Telerik support staff indicated that a likely solution would be to use the network drive as I was doing, and just remove all versions from my PC after downloading and safely storing the updates away somewhere. This seems to be similar to other solutions I've seen on SO as well.
I made the mistake of changing a subroutine in a project and publishing it. Now I want to revert back to the older subroutine. Is it possible to find the older project and retrieve the older subroutine?
Team Foundation Server can do this for you. You can now be set up without any hassle on your developement machine. The integration in the VS Team Explorer is seamless. Very easy to handle. See this guide for working with source control projects
https://msdn.microsoft.com/en-us/library/ms181384.aspx
Even easier and not so much overhead on your machine: sign up for Visual Studio Online (free for a 5 user team). The cloud source control is set up in minutes. If you are not against saving your data in the cloud give it a try.
https://www.visualstudio.com/en-us/products/what-is-visual-studio-online-vs.aspx
The alternatives (SVN, GIT) are also very good (consider reading about the difference of central and decentral source control) but need a little more knowledge and a good workflow.
If you happen to have lost changes before installing version control there's nothing you can do in visual studio. You can try a restore on file level (the option would be previous versions in the windows explorer)
as source code is plain text. There`s a "previous version" mechanism of windows explorer! Just go to the properties of your project folder
Note: previous version / shadow copying must have been enabled before or else the tab will be blank.
No, it is not possible unless you have stored your code in source control. It sounds like you have not yet done this, so I suggest using this is a (harsh) lesson and make the next move the one to install some kind of SCM.
You can signup for a free version of TFS online from microsoft the will integrate directly into Visual Studio. That will allow you to instantly check in changes and view the history of files and in this case, get a previous version of a file.
https://www.visualstudio.com/en-us/products/what-is-visual-studio-online-vs.aspx