VS 11 Support

Coordinator
Apr 23, 2012 at 7:58 PM

I really like your tool and hope the support for VS11 will be done soon :)

Keep up the good work!

Max

Coordinator
Jun 18, 2012 at 4:55 PM

I'll be using VS11 soon too, so this will be on my list.

Jun 19, 2012 at 10:25 PM

I'm also hoping for VS2012 support soon :-)

Thanks!

Jul 29, 2012 at 8:29 PM

I was able to get this workig VS2012 rc just by editing the vsix manifest file by:

1) Renaming the .vsix extention to .zip

2)Edit the vsix manifest file and update 2010 to 2011.

3)Compress to zip file

4)Rename to vsix

5)It should now install to VS2012.

Jul 29, 2012 at 9:51 PM

Hi rsiva,

 

Tried that but it didnt work for me.  However I then modified my manifest so that it still referenced the 2010 schema but changed the supported version from 10.0 to 11.0 and it installed OK.

 

Aug 1, 2012 at 2:27 PM
Edited Aug 1, 2012 at 3:05 PM
doriandarby wrote:

Hi rsiva,

 

Tried that but it didnt work for me.  However I then modified my manifest so that it still referenced the 2010 schema but changed the supported version from 10.0 to 11.0 and it installed OK.

 

I've done the same, problem is, that when I double click on csd file, VS opens it as xml file.

So I've checked VS log and there's the problem:

 

<entry>
    <record>1657</record>
    <time>2012/08/01 13:37:32.482</time>
    <type>Error</type>
    <source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
    <description>Could not load file or assembly &apos;Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.</description>
    <path>C:\USERS\USER\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\11.0\EXTENSIONS\CORT3YC3.4OF\ConfigurationSectionDesigner.Dsl.dll</path>
  </entry>

 

I've downloaded source thinking to be able to rebuild it, but it requires modeling sdk, visual studio sdk installed and some community targets, shortly speaking I think there should be a guide how to build it.

And to install modeling sdk for vs 2010 without installing vs 2010 is not possible.

Aug 3, 2012 at 6:46 PM

Installed with these instructions, however, when I start using is, it cannot generate the sample configuration file.

The sample config file only contains:
ErrorGeneratingOutput

While the output window states:
Error 61 The type 'ConfigurationSectionDesigner.ConfigurationSectionDesignerDirectiveProcessor' of the directive processor named 'ConfigurationSectionDesignerDirectiveProcessor' does not implement Microsoft.VisualStudio.TextTemplating.IDirectiveProcessor. The transformation will not be run.

Ah,

and while switching the project from 4.5 to 4.0, I temporarily got:

An exception occured while running the CsdFileGenerator on this file. See the Error List for details. E=System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.VisualStudio.TextTemplating.VSHost.OrchestratorOptionsAutomation.ShowSecurityWarningDialog(IServiceProvider serviceProvider) at Microsoft.VisualStudio.TextTemplating.VSHost.BaseTemplatedCodeGenerator.ShowWarningDialog() at Microsoft.VisualStudio.TextTemplating.VSHost.BaseTemplatedCodeGenerator.GenerateCode(String inputFileName, String inputFileContent) at ConfigurationSectionDesigner.CsdFileGenerator.GenerateAllContent(String fileExtension) at ConfigurationSectionDesigner.CsdFileGenerator.GenerateContent(String element) at ConfigurationSectionDesigner.VsMultipleFileGenerator`1.Generate(String wszInputFilePath, String bstrInputFileContents, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, IVsGeneratorProgress pGenerateProgress)

The version in vs2010 now is disabled, and upon installation and vs restart, it just re-appears... :(

Coordinator
Aug 13, 2012 at 6:17 PM

I agree that we need some good instructions on how to build the source of this project. It drives me nuts when I can't get an open source project to build, so I'm a bit ashamed of this. I'll make build instructions a priority.

Regarding VS2012 issues, I have not installed VS2012 so have not been able to investigate. Being pretty busy at work, I don't have as much time to deal with pre-release product issues, so try to wait until official releases. Since I will be able to access the release version of VS2012 in a few days, I should have an environment ready pretty soon. Many thanks to those who have already worked on solving these issues.

Coordinator
Aug 13, 2012 at 6:41 PM

I added some quick info to the wiki about building this tool youself from source code. It's pretty basic at this point, but should be of some help to others.

http://csd.codeplex.com/wikipage?title=Building%20from%20Source&referringTitle=Documentation

Sep 15, 2012 at 4:40 PM
andym1978 wrote:

I added some quick info to the wiki about building this tool youself from source code. It's pretty basic at this point, but should be of some help to others.

http://csd.codeplex.com/wikipage?title=Building%20from%20Source&referringTitle=Documentation

     With your info, I build it failed in VS2012. Because  missing some assembly.

Need more help. It's a good tool which I can't leave in my work. Now I can only do work in VirtualMachine........T_T

Oct 29, 2012 at 9:56 AM
Edited Oct 29, 2012 at 9:57 AM

@andym1978.
I can't get it to work. Can you please post a installation that works with Visual Studio 2012 somewhere? I would really appreciate it!

Nov 5, 2012 at 9:18 AM
rsiva wrote:

I was able to get this workig VS2012 rc just by editing the vsix manifest file by:

1) Renaming the .vsix extention to .zip

2)Edit the vsix manifest file and update 2010 to 2011.

3)Compress to zip file

4)Rename to vsix

5)It should now install to VS2012.

This worked for me (I am using vs2012 rc until bizspark/websitespark comes out with full version, if ever?). When recompressing. Make sure you don't simply rightclick->7z->Zip whole Configuration Section Designer 2.0.0.5 folder. You must open the folder and zip it from there... Else you will get error message: extension.vsixmanifest must be in root.

Coordinator
Nov 6, 2012 at 8:30 PM

Sorry for the delays in moving this to VS11. End of year is very busy at my work.

Coordinator
Nov 6, 2012 at 11:39 PM

I'm glad to contribute, if contribution is accepted, i've done some fix/feature like:

  • Fixed virtual property generation in sealed class (result in a build error)
  • Esc key now close attribute editor
  • Added support for keyless Element Collection
  • Added initial support for copy and paste

Kind Regards, Max

Coordinator
Nov 12, 2012 at 2:11 PM

I would love to check out your contributions ilmax.

Nov 21, 2012 at 7:34 AM
Edited Nov 21, 2012 at 8:39 AM

When trying to run in VS2012: Could not load file or assembly 'Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

You have to download and installed the Microsoft Visual Studio 2012 Visualization & Modeling SDK that contains the dll (and you should first install the Microsoft Visual Studio 2012 SDK).

The only thing I'm missing now is the custom tool. When I open a .csd file in Visual Studio 2012 it opens with the Xml (Text) Editor. There is no program in the list 'open with...' for the CS-Designer. Does anyone know how to add this?

Nov 23, 2012 at 3:04 PM

I've gotten the thing to compile in VS2012 now, and added the <VisualStudio Version="11.0"> section as supported product in the manifest, allowing installation in VS2012 directly.

Next step is debugging the thing. When I attach a separate instance of VS to the one running the CSD extension (compiled in debug mode) it breaks at the point mentioned before:

Filegeneration.CS, line 55:

In

CsdFileGenerator.TemplateCodeGenerator
public new byte[] GenerateCode( string inputFileName, string inputFileContent )

   at Microsoft.VisualStudio.TextTemplating.VSHost.OrchestratorOptionsAutomation.ShowSecurityWarningDialog(IServiceProvider serviceProvider)
   at Microsoft.VisualStudio.TextTemplating.VSHost.BaseTemplatedCodeGenerator.ShowWarningDialog()
   at Microsoft.VisualStudio.TextTemplating.VSHost.BaseTemplatedCodeGenerator.GenerateCode(String inputFileName, String inputFileContent)
   at ConfigurationSectionDesigner.CsdFileGenerator.TemplateCodeGenerator.GenerateCode(String inputFileName, String inputFileContent)

Neither my inputFileName nor inputFileContent are null.

The string inputFileName contains the (correct) path to my csd file.
The string inputFileContent contains all content from the file 'ConfigurationSectionDesignerSample.tt' 

Does anybody have a clue on how to continue more intelligent debugging?

Coordinator
Dec 6, 2012 at 10:04 PM

Just an FYI. I am currently converting this to VS 2012. If anyone has any more useful info from their own experiences performing this task, I'd love to hear it. It will help speed up the process.

Coordinator
Dec 6, 2012 at 10:09 PM

Hi andym, converting is easy, just run the conversion tool from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VSSDK\VisualStudioIntegration\Tools\DSLTools (SDK install required).

I have done some changes to code generation, if you are interested, i'm glad to contribute to the the project.

Max

Coordinator
Dec 6, 2012 at 10:41 PM

Thanks for the quick response Max! I'm glad you would like to contribute to the project. I'll try to contact the other developers ASAP so I can get you on board.

When I opened the solution from VS 2012, it automatically converted it over for me (after SDKs were installed). After that, I just upped the version number, changed config to support .NET up to 4.5, and deployed the VSIX package. I have posted the package to downloads as an ALPHA release. I have NOT uploaded the source yet because I'd like to see if I can avoid maintaining separate sources for building VS2010 and VS2012 packages. Ideally, I'd like to fork the source to VS2012 and be able to create packages for both VS 2012 and VS2010 from said VS2012 source. 

Dec 7, 2012 at 10:40 AM
Edited Dec 7, 2012 at 10:41 AM

Hurray for you taking this up as a project. When I find time I would like to help you out where I can.

The current version does create the required code, but fails to create a sample config file + the Xsd on my machine. (same error as I mentioned before)

Do you have a separate fork + bugtracking where I can post info to? It appears to be the same as I mentioned before.

Coordinator
Dec 8, 2012 at 1:34 PM

Atrejoe,

The problem always seems to be finding time. :) That's why it is good to have more people working on it: Our minimal amount of free time starts to add up.

I'll take a look at the code gen issue you described. If not this weekend, then Monday. Should be a simple issue. I was able to get debugging working decently well in VS2010 (critical for tracking down issues) but have not yet tried in VS2012. At work, I use a significant amount of trace logging to help track down user reported issues. It may be worthwhile to add this type of tracing to this project so users can submit trace files to us.

There is no separate fork for this version, yet. I plan on doing that ASAP starting Monday.

Regards,

Andrew

Coordinator
Dec 10, 2012 at 2:28 PM

I have debugged the extension to try and track down this issue. I believe this issue is due to UAC. It seems as though we need to elevate permissions when writing files to the project directory in VS 2012. I'd rather not require elevated permissions, so it would be nice to find another way to do this. For now, users may need to run VS2012 as administrator to get around this issue. What a pain...

Coordinator
Dec 10, 2012 at 2:32 PM

Maybe is because of source controlled folder?

Coordinator
Dec 10, 2012 at 3:11 PM

I believe you are right. That issue is gone after removing R/O attribute to that folder, but I am getting a null ref exception generating content for XSD. All my assembly refs point to VS 2010, so I'm changing to VS 2012 to see if that helps.

Coordinator
Dec 10, 2012 at 3:20 PM

I think that if the folder where code will be generated is under source control, you should get a kind of lock (which removes R/O attribute) over that folder before writing safely something.

I think that VS should be an abstraction over all source control plugin so you can ask to VS something like: "Hey, does this folder is under source control?, if true please get a lock for me".

Coordinator
Dec 10, 2012 at 3:33 PM

Ahh... Now I see why the DSL migration tool must be used... It updates all of those references.

Coordinator
Dec 10, 2012 at 3:36 PM

Implementing that source control behavior would be very useful. I now remember that I've had to manually checkout the CSD related files before editing.

Coordinator
Dec 10, 2012 at 3:54 PM

Issue now appears to resolved after following Ilmax's directions on running the dsl migration tool. My XSD files are now generated. I have updated the VS 2012 ALPHA download to reflect this fix.

I'll try to find time today to add the new source project folder for VS2012 to source control.

Coordinator
Dec 10, 2012 at 4:03 PM

Following code should be an entry point for such feature

// Check file
if (sc.IsItemUnderSCC(pahtOfFileThatShouldBeGenerated))
{
	sc.CheckOutItem(pahtOfFileThatShouldBeGenerated);
}

where sc is an instance of EnvDTE.SourceControl.

links with documentation

Coordinator
Dec 10, 2012 at 4:29 PM

Excellent work Max. I have created the VS 2012 branch in source control, so please feel free to make changes. Have you been able to login to TFS for this project?

Coordinator
Dec 10, 2012 at 4:45 PM

Yes Andrew, I'm already connected to source control.

As soon as I have some free time, i will try to add this functionality.

Coordinator
Dec 10, 2012 at 4:55 PM

Great. Thanks for the help.

Dec 10, 2012 at 7:46 PM

Same here, great work!