Can Visual Studio Package built in VS2005 be deployed on VS2010? - visual-studio

I want to deploy a Visual Studio package built using VS2005 deploy on VS2010. I am able to register the package(using regpkg.exe) and I am able to see it as a project template in VS2010. However, the package has a editor page which is displayed as soon as we select this project template which does not get displayed and instead it shows a default editor of VS2010.
I am not sure if this is a problem registering the package or a problem between Visual Studio versions. Can someone help?

We've seen this issue in attempting to launch the editor for existing projects that were originally created in VS2005. We have an editor that handles a specific extension (.svc). In VS2005, the .csproj had:
&ltItemGroup&gt
&ltNone Include="MyServices.svc"&gt
&ltSubType&gtDesigner&lt/SubType&gt
&lt/None&gt
&lt/ItemGroup&gt
Removing the <SubType>Designer</SubType> allowed the expected behavior (double-clicking on the file opened the plug-in) rather than the default editor. Creating a new .svc file in VS2010 resulted in:
&ltItemGroup&gt
&ltContent Include="MyServices.svc" /&gt
&lt/ItemGroup&gt
That always seems to work correctly.

Related

UNITY_EDITOR undefined in Visual Studio

I'm debugging some code from within the Unity editor that starts with #if UNITY_EDITOR, but UNITY_EDITOR isn't getting defined though I'm running Visual Studio through the Unity editor. I've tried
Ensuring that I've got Visual Studio set in Debug mode (vs. Release)
The Scripting Define Symbols settings, and msc and csc solutions from here: http://docs.unity3d.com/Documentation/Manual/PlatformDependentCompilation.html?_ga=2.148389495.1394951635.1638832224-1796620461.1636419298
I've also tried to just add a #define to the project sheets that Unity is generating, which doesn't work because there's no project files that these files are being opened & debugged through. And, I've regenerated solution files. What am I missing? Thank you!
Edit:
Some additional important information: this behavior isn't happening in all files within the Visual Studio instance, just files that are NOT included inside of any of the the .csproj's in the solution I have open. So, my workspace is .csproj's that do have UNITY_EDITOR defined, but the file I'm opening is from outside of that project. In this case, the .cs file I'm trying to debug into is from a package that is running, so the debugger will drop into it, but no .csproj is generated for this package.
It seems to me that there should be different behavior here, but I'm not sure what it is. Should Unity create a .csproj for packages whose .cs files you can debug into so that you can view them correctly in Visual Studio?
So, finally: in the context of the existing .csproj's that I have open, if I add a line <Compile Include="Full\Path\To\File.cs" />, it works as desired. Kludgy, but it works for my purposes.
In one of the existing .csproj's that I have open, if I add a line , it works as desired. Kludgy, but it works for my purposes.

Unity keeps removing log4net from my Visual Studio project

I tried to install log4net for use in my Unity project with the following command :
Install-Package Unity.log4net
However, when I go back to the editor, then back to Visual Studio again, the log4net reference is removed, just like the Unity Editor had regenerated the project or something like that. The log4net reference no longer appears in the reference list and thus the log4net namespace can no longer be found.
I'm using Visual Studio 2017 Community Edition.
Has anyone experienced that and found a solution ? Thanks !
It seems like one cannot freely add references to a Unity project since Unity has to know about them. DLLs should be placed in a folder of the project called Plugins and then it works.
However it's weird that people are telling to use nuget packages. I'm assuming that must work somehow, but I don't know how. The solution above is dirty, but at least it works.
Unity projects require a special process to add NuGet packages. This is because when you open a project in Unity, its Visual Studio project files are regenerated, undoing necessary configurations. To add a package from NuGet to your Unity project you can check this doc from Microsoft: https://learn.microsoft.com/zh-cn/visualstudio/cross-platform/unity-scripting-upgrade?view=vs-2019

Where is the Visual Studio 2017 Winforms Designer cache?

I'm getting some annoying errors from Visual Studio Designer when trying to open one of my forms (Could not load type x from assembly y, even though assembly y clearly contains type x; the project builds and runs fine). It looks like Visual Studio Designer cache issue to me. I looked around and it seems like Visual Studio Designer uses a ShadowCache, normally found at
C:\Users\%UserName%\AppData\Local\Microsoft\VisualStudio\15.0_6d397e1a\Designer\ShadowCache
However, that folder is empty. This suggests to me that there must be some other cache location, since I am using designer for some other things, there should at least be something in the designer cache location...
To clean windows forms designer project assemblies, you need to delete subforlders of ProjectAssemblies folder which is located in %userprofile%\appdata\local\Microsoft\VisualStudio\ under one of the folders depending to your visual studio version and edition.
For example for me:
%userprofile%\appdata\local\Microsoft\VisualStudio\15.0_a26f780e\ProjectAssemblies
If you look in the folder, you see subfolders containing assemblies of your projects.

Visual Studio 2013 with Angular2 and Typescript

I'm using the angular2 QUICKSTART and I have a problem where Visual Studio don't recognize Angular2 with typescript import Modules, in rest all it's fine:
It says:
Cannot find module 'angular2/platform/browser'
My app :
is compiling .ts files without errors
it runs in browser without errors
if I open the project in VS code it works fine, no errors in IDE
I know that typescript should read .d.ts file directly from node_modules --> angular2, but anyway I tried to add angular2 DefinitelyTyped and still not worked.
Atm I use VS 2013 update 5 with typescript 1.5 installed (I also tried with 1.75)
Please right click on the visual studio project and click on the Properties option, Then select Typescript Build,default 'none' is selected, change it to 'CommonJs'.
If again any problem regarding 'experimentalDecorators' persists unload the project and add <TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators>statement inside the PropertyGroup tag.
Again problem exists on building the project such as 'could not find the name Map', 'could not find the name Promise', or 'could not find the name Set' try to change the target to 'es6' in the tsconfig.json
Solved by using Visual Studio 2015.

How do I add ArcObjects Version to a Visual Basic project?

I am developing a Visual Basic project in Visual Studio 2010 that uses ArcObjects. (I have ArcGIS 10.3 for Desktop.) I am getting the error "'RuntimeManager' is not declared. It may be inaccessible due to its protection level." A previous answer, Esri ArcObjects--Esri.ArcGIS.Version assembly, recommended adding a reference to Esri.ArcGIS.Version by clicking on Project, Add Reference, selecting it under .NET and clicking OK. I have tried to do this, but it's not under .NET. What can I do to make it available?
You should be able to find it if you use the Browse option.
The ESRI.ArcGIS.Version.dll file should be under your DeveloperKit installation folder. For me it is:
C:\Program Files (x86)\ArcGIS\DeveloperKit10.2\DotNet

Resources