Visual Studio 2017 Won't run Custom Tool in .NET Standard Library - visual-studio

I'm porting all my development to Visual Studio 2017. I made heavy use of Portable Libraries in 2015, but it appears that .NET Standard is the way to handle cross-environment issues going forward. I've got a single file code generation extension that I've upgraded. In Visual Studio 2017, it works great against the traditional .NET libraries and portable libraries, but it doesn't work with the new .NET Standard library I'm trying to build. I'm happy to consider that I've done something wrong, but the GITHUB example doesn't work either:
https://github.com/Microsoft/VSSDK-Extensibility-Samples/tree/master/Single_File_Generator
Anyone know why Visual Studio extensions (at least code generation extensions) don't work on this project type?

Related

What is the difference between visual studio and visual c++ IDE

What is the difference between visual c++ and visual studio.
Also codes written in visual c++ do affect the portability and functionality of the code??
Visual C++ is one of the languages that is supported in the Visual Studio IDE. I'm not aware of a separate Visual C++ IDE, and relevant searches return information about working in Visual Studio.
These are all part of Microsoft's development platform, and as such they most easily target Windows platforms and .NET. Beyond that I'm not sure I understand your question about portability.
I remember seeing Visual C++ awhile back but Microsoft has moved to making Visual Studio their single IDE.
Check out this wiki link for more information. It says that Visual C++ has migrated into Visual Studio. However, it seems there might be some compatibility issues if you are using an older VS. I see you tagged VS2010 so you may want to read up on it depending on what functions you're using. Looks like VS2015 update 3 is the latest release that captures those functions.
https://en.wikipedia.org/wiki/Visual_C%2B%2B

Developing Visual Studio addins for multiple versions of Visual Studio

I've been given the task of developing some extensions for Visual Studio for our internal use. These will have to support a couple of different versions of Visual Studio (VS2008, 2010 and 2012 - VS2005 would be a nice to have but not essential). I'd like to develop these in as consistent a way as possible, reusing as much of the code as possible, while fitting it into the existing project structure for these kinds of tools, which is a Visual Studio 2012 .sln.
What's the best / easiest way of developing this kind of extension? A VSPackage project? Can I make a 2008-compatible VSPackage which is developed in VS2012?
The features I will need for the extensions I'm writing at the moment are pretty basic - I need to create Tools menu commands, possibly a custom toolwindow. My requirements might change later on but I don't need editor adornments or anything like that at the moment.
I saw this question which might seem to be a duplicate, but the answer which was accepted doesn't answer the question, so...
It really depends on what is your extension going to do.
VS2008 does not support extensions (.vsix) and you will need to write VSPackage deployed as msi for it. You also won't have access to many new features introduced in VS2010 (easier editor integration and access to vs services via MEF), but basic stuff such as manipulating solution/project/files should be fine and work on all versions (e.g. using DTE should be ok).
As far as I remember for VS2008 you will also need to obtain a PLK, which is no longer required for 2010 and 2012.
I haven't tried developing 2008 package in VS2012, but you definitely can develop 2010 extension in 2012.
Also remember that VS2008 is .Net 3.5, so your code should use .net 3.5 and version of c# which it supports to be portable.

Why do Visual Studio solutions need to be upgraded with every release of Visual Studio?

This is easily one of the most annoying "features" of Visual Studio in its history and I don't understand why it exists -- ever.
Why would a CodePlex project need to care what version of Visual Studio I am using?
Off the top of my head, the only thing I can think of is that some versions of Visual Studio might introspect assemblies searching for attributes to determine what to display in "Visual Designers" and "Property Editors". But why would that cause Visual Studio to not be able to open the project and allow me to browse its contents and compile?
It seems to me like Open Source in .NET is somewhat limited by the stupid dependency management exhibited by Visual Studio. In other words, if I am using Visual Studio 2008 and you are using Visual Studio 2010, then we have different solution files.
http://blogs.msdn.com/b/visualstudio/archive/2010/03/15/why-does-visual-studio-2010-convert-my-projects.aspx
Here's an example from the site as to why Visual Studio converts your projects to 2010 format.
For instance, Visual Studio runs
custom tools such as single file
generators for designers in order to
output code representing the changes
made to the designer. Many of these
custom tools are upgraded or
completely replaced in the newer IDE.
During conversion, the IDE knows which
custom tools to replace or upgrade. In
order to make round-tripping work, VS
would need old and new custom tools to
understand each other so as to ensure
that old and new designers can work
side by side. Other than designers,
the following files would also be
affected: resource editors, wizards,
code snippets, item and project
templates, diagramming and modeling
tools, and many more.tools, and many more.
Since 2010 knows about what tools 2008 has, it can convert forward to be compatible with the custom tools 2010 uses. 2008 has no idea about what 2010 is using, how could it? Therefore, it is impossible to convert backwards since it doesn't know what it needs to convert, nor how to.
I believe the purpose of this touches on what you stated in your comments. If you are using 2008 and I 2010 and I compile it, how could you possibly run it again? 2010 is backwards compatible but 2008 has no way to make itself forward compatible.
Thus, by recompiling the project in 2010 I ensure that no 2008 user may mistakenly think they can compile it.

Which version of Visual Studio should I install?

I am going to install Visual Studio. I want to know if the latest version of Visual Studio 2010 is backward compatible with previous versions like VS 2005 and 2008. Or is the code functionality and deploy-ability more dependent on the .NET framework version.
I am trying to use a code which will be built into dll. I am not sure in which version of VS the code was written(most probably VS 2005).
Thanks...
I would suggest to go with the latest Version.
VS 2010 can target multiple frameworks.
http://msdn.microsoft.com/en-us/library/bb398197.aspx
So the dll should know with which framework it was compiled...
I have never found any issues with Visual Studio 2010 and previous versions' code. It also does feature significantly improved Intellisense and [IMHO] faster building.
they are all backward compatible
2005 and above allow you to target the framework you want when creating
the project
if the project is older
than the VS, it will prompt you with
a migration wizard upon opening
it(this is a one time only step.
Couple of things to note that i've found with 2010 which have caused us a couple of issues:
1) NHibernate (Castle Proxy) doesn't work with .net framework 4 (Currently)
2) Test Projects are always created aimed at .net framework 4, and you cannot target a lower version of the framework.
Otherwise not many problems, its also nice that the database addition of Visual Studio 2010 has intellisense on your tables/views, as well as many other changes
Always go with the latest, now 2010

IronPython :- Visual Studio 2010 or SharpDevelop?

I'm considering developing a medium-size project for a client in IronPython. It's a pretty straightforward replacement for an existing system I've been supporting for several years, so the specification is quite well defined and understood.
This is my first significant IronPython and .Net project so I'm expecting a bit of a learning curve. I was going to use SharpeDevelop, but I can purchase VisualStudion 2010 for a reasonable price and whilst I understood that IronPython Tools for Visual Studio 2008 were not so good, I haven't seen anything about the update for 2010 yet.
Has anyone used either or both of these in a reasonable-sized commercial environment and do you have any recommendations?
(and I'm aware of this question, but this is specifically about VS2010)
Here is a quick comparison of IronPython Tools for Visual Studio 2010 and SharpDevelop showing the features that one has which the other does not:
IronPython Tools for Visual Studio 2010 has:
Better intellisense.
WPF designer.
Can edit your code without a project.
Go to definition support.
Find all references support.
More comprehensive IronPython interactive window integration.
SharpDevelop has:
WinForms designer.
Code conversion support from C#, VB.NET to Python
Compiles your IronPython code to an executable or class library.
Both of them are free. You can use IronPython Tools with the Visual Studio 2010 Shell (Integrated) which is a free download.
Considering that the IronPython Tools for VS2010 are "only" at the CTP stage, they're very high quality (anyone else would call them a beta). I've been using them when I can for a while now and haven't had any major issues. If you do have any issues with the VS2010 tools, the IronPython team is very open to feedback.
I haven't used SharpDevelop's tools, however, so I can't really compare them.
Greetings;
From what I've followed and read on-line during the Visual Studio 2010 Beta program and after, there seems to be no direct IDE support for IronPython in Visual Studio .NET 2010:
http://www.itwriting.com/blog/2158-why-f-rather-than-ironpython-in-visual-studio-2010.html
However, there is a Dynamic Language Runtime Support for the .NET 4.0 Framework using IronPython through a stable release of IronPython 2.6.1 on CodePlex:
http://ironpython.codeplex.com/releases/view/36280, but again, there is no direct support for the Visual Studio .NET 2010 IDE.
As for IronPython support in SharpDevelop, the IDE has full support for WinForms and Console based applications, and debugger support for IronPython, including 2.6.1 and the .NET 4.0 Runtime beginning with SharpDevelop 3.2 RTW. Matt Ward, who has headed up the IronPython and SharpDevelop IDE integration efforts has been very active and helpful through the forums and his blog entries. I was working on a small project in IronPython using SharpDevelop, and for the questions and bug that I found during SharpDevelop 3.0 Beta 1, Matt's support and turnaound time for IronPython issues was tremendous.
With this in mind, if you're looking for the productivity gains of using an IDE, with source code debugging support for IronPython applications and all of the benefits of using the .NET 4.0 Framework and DLR Support, you may want to start with SharpDevelop.
I hope this was of help...

Resources