I've been working on a process for programmatically generating Visual Studio projects using GetProjectTemplate. You provide GetProjectTemplate the name of the template (a .zip file like "MvcWebApplicationProjectTemplatev3.01.cshtml.zip") and the language ("csharp").
Here's the path to MvcWebApplicationProjectTemplatev3.01.cshtml.zip
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache\CSharp\Web\1033\MvcWebApplicationProjectTemplatev3.01.cshtml.zip
I'm trying to find the template name for WCF Rest Service Application. It's the same template used by Visual Studio when creating a new WCF Rest Service project. I've looked all around where MvcWebApplicationProjectTemplatev3.01.cshtml.zip is saved and cannot find anything that resembles WCF Rest Service template.
Thanks Tom
The template is an extension and because of that it is not part of Visual installation (that is affected only by separately installed products). You will find the template under your user profile:
"%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\WCF REST Service Template 40(CS)"
Related
I'm attempting to add Service Fabric Service templates in addition to the default ones such as "Stateless Service" etc. to start making services quicker.
Visual studio has export template and VSIX Project Templates options, but these templates appear only in New Project not in "add new Service Fabric Service" in a service fabric application.
The other issue is that in "add new Service Fabric Service" it automatically adds the new service to the Service Fabric Application ApplicationManifest.xml, which the other template methods don't seem to do.
After snooping around visual studio files it seems that the service fabric service templates are stored in a Visual Studio extension, however when trying to add new XML files as Service Templates and including them in manifest.xml they did not show up.
Any suggestions to how service fabric service templates could be added to VS?
I got something messed up in the publishing of my azure function. Visual studio is looking for my azure function's publish profile file in another projects folder (my asp.net site). It doesn't seem like this is the way it's supposed to work, shouldn't msbuild look for the publish profile (.pubxml) in the properties folder under the project I'm trying to publish? Instead it's looking under the properties folder of the asp.net mvc site in the solution.
Does anyone think it has to do with me referencing the asp.net site as a reference in the azure function project?
How do I reset the path where Visual Studio looks for the projects pubxml file?
I've tried resetting VS, deleting the publish profile file and creating a new one and a few other things but every time I try and publish the azure function to azure it fails to publish because it's looking in the incorrect place!
Here is what the first error says in the output window. It shows it's looking for my pubxml file in in another projects folder. the Yogabandy2017 folder, when it should be the PreEventCancellationFunction folder
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(4368,5): error : The value for PublishProfile is set to 'Yogabandy2017Functions - Web Deploy', expected to find the file at 'C:\Users\Charles Pareto\Source\Workspaces\YogaBandy2017\YogaBandy2017\YogaBandy2017\Properties\PublishProfiles\Yogabandy2017Functions - Web Deploy.pubxml' but it could not be found. [C:\Users\Charles Pareto\Source\Workspaces\YogaBandy2017\YogaBandy2017\YogaBandy2017\YogaBandy2017.csproj]
I am trying to generate code scaffolding for an in-house API. I created a T4 template which includes several other templates for each code file to be generated. I then wrote a Visual Studio Extension (VSIX) with a WPF form to capture user input and initiate the transforming of the T4 template. I am doing all of this in Visual Studio Professional 2013.
This is what I followed to Invoke the Text Transformation in a VS Extension
https://msdn.microsoft.com/en-us/library/gg586947%28v=vs.120%29.aspx?f=255&MSPPError=-2147217396
When testing the templates locally using Run custom tool, everything works perfectly. However, when testing the VS extension in an Experimental Instance of Visual Studio, the problem I am having is that after the transformation has been invoked [calling ITextTemplating.ProcessTemplate], the generated files are not placed into my open project. I verified that they exist in their appropriate folders in File Explorer.
I have searched high & low and can't find anything that talks about this. Any ideas?
The custom tool is using the Visual Studio API (DTE object) to add the generated files to the projects. I built something very similar and that is what I had to do. This project is a bit old but it is a great starting point for seeing how this can be done.
Basically you need to get a reference to the folder you want to add the new item to and then call AddFromFile. Also don't forget to save the project after you add all the items.
Tech Friends,
I could not add MSCRM 2011 WCF service reference in Visual Studio 2010. It throws error when try performing this action. How do we add this service as service reference in Visual Studio 2010 and generate all proxy classes?
Have you tried following these instrutions? Download the Endpoints Using the Dynamics CRM Developer Resources Page.
Specifically in the "Using the WSDL" section.
To add a service reference for these services to a Microsoft Visual
Studio 2010 project, you must append ?WSDL to the service URL when
specifying the address in the Add Service Reference dialog box. For
example, the discovery service WSDL address is
http://servername/xrmservices/2011/discovery.svc?wsdl.
I found the resolution for the problem and I have tested it :)
To add discovery service and organization service as reference in Visual Studio we have to add query strings: ?wsdl=wsdl0
eg:-
.api.crm4.dynamics.com/XRMServices/2011/Organization.svc?wsdl=wsdl0
The same applies for discovery service also.
Check this link:
http://social.msdn.microsoft.com/Forums/en-US/crmdevelopment/thread/033f9831-5e88-4b85-a4eb-a55985f39997
I've created a Visual Studio 2010 ASP.NET MVC Project Template as a VSIX package that I'd like to upload to the Visual Studio Gallery, but every time I try it tells me the path is too long...
Locally, it installs and works without issue...
The structure of the project (zipped as t.zip to try and reduce the length) is a standard MVC structured project, the only caveat is that it needs (well, doesn't need to but makes sense for it be there) installs to the Web sub-folder under the C# language, so the path inside the VSIX package is ProjectTemplate\CSharp\Web.
Is there a way around this limitation, or am I simply doing something wrong?
There is a check when you upload to the VS Gallery to see if the path length might end up being too long when installed on the users machine. This check includes not only the files directly in your VSIX, but also the files embedded inside the zip file. (This is because templates are unzipped on disk before they are used for instantiating a new project.)
Unfortunately, I think your only option is to shorten-up the paths of the files in the template itself.