I have a fairly straight-forward question.
I have been working on a .NET web development project for about two weeks now, and I JUST got Visual Studio 2012 and I very much THOUGHT I had set it up to default to C# projects. Silly me.
I have not written a single solitary line of code yet, so when I finally roll up my sleeves and prepare to dive in to writing some code...I encounter the unpleasant surprise that I have developed the entire interface of the application without realizing this is a VB project, not a C# one.
I do not have ANY code to translate, I just want to know if there is a way to just change it over to C# without having to recreate the whole project in another file.
Since the work you've done is non .NET I recommend creating a new C# project and porting it over.
However I recommend:
The VB.NET project is in source control and fully checked in
You create a new C# project so you can work on them side-by-side
You can use a diff editor such as WinMerge to ensure the important files are moved and are kept the same relative to each other.
Related
I want to develop an VST plugin in C#. Looking around the internet there are not that many libraries in .NET that deal with VST plugins. The only thing I found is the VST.net library (https://vstnet.codeplex.com/). This thing hasn't been updated in a while.
The problem: I am having trouble setting it up the basic project. There are project templates for that project which are done for VS 2008/2010 which is .vsi file. I tried looking around for ways to open it in the latest VS (2017) but I was not successful.
Is there a way to open these in Visual Studio 2017 or should I have to install the older version of Visual Studio to make this work? Or if you have a suggestion for another library/extension that will help me with the development I would appreciate it.
Comments: I am aware that there is better support in C++ for this type of thing but my additional problem is that I have a project in C# that I would like to use and not be forced to rewrite the entire code base.
Thank you in advance for looking into this issue.
How do I make a MVC project appear properly in Visual Studio? I understand the logic of this sort of structure. I have seen some blogs and explanations and even code segments explaining how a program can use MVC. But I want to know what is a good way to represent a Model-View-Controller program in the Visual Studio.
For example, in an ASP.NET program, the asp.net file is associated with a C# file. THey have the same name and, in the Solution Explorer window of the Visual Studio development environment, they are shown linked together where one is a tree branch of the other. Should the same sort of thing be done for a MVC solution? I can remember a few years ago, I worked on a MVVM project, and a developer who first put the solution file together actually had view and the view-model files arranged like this. In order to make this happen, he had to download some sort of patch that allowed him to edit the .sln (solution) file.
Is that the way to go for a Model-View-Controller program? Should each be its own workspace in the solution, or should the solution file be edited such that each Model-View-Controller coupling be handled as a tree structure file representation kind of like it is done for an ASP.NET solution?
Here is another question. What is a good template to use in Visual Studio to create an example of a Model-View-Controller program? I tried this route but when I clicked to "get new templates", it did not work:
http://i67.photobucket.com/albums/h292/Athono/Embedded/Capture_02_zps6vn4ri07.png
http://i67.photobucket.com/albums/h292/Athono/Embedded/Capture_zpscdczk1b4.png
From your screenshots, it looks like you're using an old version of Visual Studio (either 2008 or 2010, there isn't enough showing to be sure, but I see the default .NET framework listed as 3.5 up there).
The latest versions of the ASP.NET MVC framework requires .NET 4.5. Visual Studio 2010 doesn't support this, so the solution is to upgrade to a newer version of Visual Studio which includes support and project templates specifically for the latest versions of ASP.NET MVC.
I would like to create a Visual Studio Solution and a C# Project programmatically, but without a instance of Visual Studio installed on the machine.
Scenario
I am trying to build a "engine" that will read some metadata in a SQL database and transform them into a UI. The database will be maintained by another people with a Web or WCF interface and I want the Server Application frequently (by schedule or pressing a button) use this informations to create autommaticaly a new version of the software (create solution -> project -> build -> create deployment).
So, I searched about programmatically create Solution and I found only the Automation Model in VS, it's about use an Add-In Project and this don't serves for my propose.
Perhaps I was a little confused in my explanation, so ask me more especific details, so I can be more accurate :)
Thanks for help
I think generating the solution is a little extreme.
The solution file structure hasn't changed much since 2005 http://msdn.microsoft.com/en-us/library/bb165951(v=VS.80).aspx, and there are a few projects trying to automate their generation, like Premake https://bitbucket.org/premake.
However, the kind of scenario you describe, might be I believe (better?) adressed with t4 templates http://msdn.microsoft.com/en-us/library/vstudio/bb126445.aspx, or only project file generation.
What you are describing is possible to do in C# Windows app but tedious and difficult. I remember seeing VB6.0 app like that but here i would suggest you look into WPF. Still it's C# programming but WPF can load dynamically a "window" from a string or a file if you want.
THe fact that some of the code I am studying is writtne in C++ and some of it is written in C# is a condern. Could it be that I need to step from one DLL written in C++ to another written in C#? If so, what should the default language that I load the Visual Studio IDE in?
Pick whatever one you're likely to use the most. Choosing C# for example doesn't mean you can't use Visual Studio for C++ projects. It just means that for example when you create a new project the C# project list will be the ones at the top. There are probably other subtle differences too (such as adding a new class etc to an existing project), but there's nothing major.
The default language that you load Visual Studio has no bearing on the files you are able to edit or create in Visual Studio
All it does is setup the defaults for when you create a new project or class to automatically default to that language.
So I would say which ever language you are going to be using most would be the ideal choice.
I Would personally use the C# as the start up.
Reason for this is that you can easily read C++ code, but if your writing an application in C#, it would easier to start VS in c#.
Instead of writing my ASP.NET C# applications in Visual Studio, I used my favorite text editor UltraEdit32.
Is there any way I can implement MVC without the use of VS?
There is nothing VS specific with the MVC framework - it is just a bunch of DLLs that you can use. The wizards in VS just build you a quick-start framework.
ASP.NET MVC is "bin-deployable" - there is nothing too clever to set up on the server either - just point the wildcard ISAPI filter to ASP.NET
Assuming you have the correct assemblies and a C# compiler you in theory can use whatever you want to edit the code and then just run the compiler by hand or using a build script. That being said it is a real pain doing .NET development without Visual Studio/SharpEdit/Monodevelop in my opinion.
Even if you didn't want to actually edit in VS, you could create the project there and edit the files in another editor.
For small to mid size mvc project WebMatrix is not bad at all. Also for simple changes to the projects I often use SublimeText.