How to install Contract-First Tool in VisualStudio 2012 - visual-studio-2012

I have VisualStudio 2012 and I'm trying to follow the following tutorial http://msdn.microsoft.com/en-us/library/hh674270.aspx
But I couldn't find the option Schema Definition from the WCF pane of the Templates dialog.
Do I have to install something? What would that be? An extension, perhaps?
Thanks in advance.

You don't need to install it - it's already there. What might be catching you out is that it's only available in the "WCF Service Library" template.
Once you then add a schema file as shown:
You then get an additional option on the project properties:

I want to add my findings.
I too wanted the Contract-First tool and didn't find the setting mentioned in the msdn link.
However I found out how to add it to any project type as I wanted my iis-hosted services to use contract first aswell.
What you do is to create a "WCF Service Library" as mentioned above.
Then open the csproj-file for the project in a text editor.
Then copy paste the entries that looks something like this into the other project-file
<FlavorProperties GUID="{3D9AD99F-2412-4246-B90B-4EAA41C64699}">
<WcfProjectProperties>
<AutoStart>True</AutoStart>
</WcfProjectProperties>
</FlavorProperties>
Also you need to change the guid:s in the target project to something like this:
<ProjectTypeGuids>{3D9AD99F-2412-4246-B90B-4EAA41C64699};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
The FlavorProperties tag with its guids are from vs2012 update 3 so it may change in the future.
So with this hack you're able to deploy contract first services directly to the iis.
The question however is why it wasn't working like this out of the box in visual studio 2012

You don't need to add the XSD from the WCF pane, just take the XML Schema item from the Data pane.
If VS 2012 has the option "Enable XSD as type definition language" on, it will generate the types under the namespace of your solution + ".ContractTypes".
Check the output windows to see what the build process is doing with the XSDs.

Related

team foundation server multiple check outs disabled but still possible

I use Team Foundation Server for Source Control and in my Visual Studio I unckeckd the Option: "Multiple Check Out".
But when I check out a file and modify it another user can still check out the same file and also modify it.
What went wrong??
If you have to look at this issue then you are probably not checking in enough. Its a workflow and not tool change that is required.
TFS only supports the single checkout model if all users are using Server Workspaces. The default changed in 2012 to Local Workspaces which does not support this.
https://msdn.microsoft.com/en-us/library/ms181383.aspx
Check out the MSDN documentation for how to change workspace modes.

How do I migrate from TFS to Visual Studio Online using the OpsHub Utility?

I am attempting to migrate to VSO from TFS and receiving the following errors:
I have administrative rights in both VSO and TFS.
Please help me figure out what the problem is.
Thank you!
Here you find answers to your all queries.
Administrative Right(s):
The OpsHub Visual Studio Online Migration Utility requires that the user that is used to create the Visual Studio Online End Point is a member of the Project Collection Administrator Group.
To grant the user that particular right, follow the following link.
http://www.opshub.com/ohrel/Resources/TFS/permissions.php?page=admin
Template Customization:
You are facing template customization error due to you have configured custom field(s) at your source end.
& such field(s) are not exist on your target VSO.
Solution for this is to delete the custom field(s) at your source end & revalidate again to processed further using migration utility. Migration on customized process templates are not supported through free utility.
You can revert customization incase you want to continue your migration with free utility with the help of following article.
http://msdn.microsoft.com/en-us/library/dd236909.aspx
You can use power tools for quick configuration of custom fields
http://visualstudiogallery.msdn.microsoft.com/f017b10c-02b4-4d6d-9845-58a06545627f
Missing Link Type(s) Warning:
You are seeing link type warning because your target VSO instance is not having Affects and Affected by link types. Still you can continue the migration with warning, in this case your Affects & Affected by link type(s) will migrated as “Related” link type.
Alternative solution is to create new project with CMMI template in your target end. This will automatically add the missing Affects & Affected By link type(s) in target VSO. After doing this revalidate again and proceed further without warning. You can remove newly created CMMI project once you are able to see Affects, Affected by link types in you project.

I can't add/remove service reference after migration to VS2012

I get this error after I try to Update/Delete/Create a service reference:
The configuration for the service reference could not be added due to the following issue: Attribute 'binding' is required on element 'endpoint'.
In VS2010 it was working fine.
I've tried a lot of things included:
Strike one:
Unchecked the "Reuse Types in referenced assemblies" checkbox in the Configure Service reference dialog.
Strike two:
Remove all the references from the project, add them again
Unchecked the non-Microsoft dlls in the Configure Service reference dialog.
Strike three:
-Uninstalled/Reinstalled VS2012
-Deleted/Remapped original project
-Added the service reference in a brand new project
-Delete old service .wsdl's, .xsd's, .disco's, .svcinfo, .svcmap from the original project
-Edited the .csproj xml to remove the old files and insert the new files
-Copied the service files from the new project to the original project
-Now the old project builds but I still can't add/remove/update any service references
P.S. I really loved VS2010 but I can't say the same about VS2012... still...
1.Just open your VS-2012 solution in VS -2010
Clean the client project
Add service like as you add your service previous => Configure service=>Update Service
Close the solution from vs-2010
Now Open your solution in VS-2012
Your Project is ready for VS-2012
You can also see the link
Add Service After Migrate VS-2012

deploy an Application page of Sharepoint 2010 to another production server

How to deploy an Application page of Sharepoint 2010 to another production server.
I've created an Application page of Sharepoint 2010 inside the mapped layout folder. Everything works nicely now in Visual Studio 2010.
I can debug it after pressing F5, I can retract it and deploy it with Visual Studio 2010.
But when it comes to deploying it to another production server, I have tons of questions.
Basically I don't know how to deploy it to another production server. My first thought was just copy the pages to the Layout folder of IIS and register the referenced dlls. But after I studied a little bit of deployment, I feel my thought is ugly.
I tried "right clicking" on the project name and "package". The Visual Studio generates a "MyProjectName.wsp" in the bin folder. I used the central administration to upload this wsp file. But when I activate it, it raised an error saying "This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'af2f9404-3b39-4f90-87f5-31e14b2f9a9a' failed validation, file manifest.xml, line 6, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'." It seems that my application is not a sandbox, but I can't change it to a sandbox. Because when I do change it, the Visual Studio tells me "The deployment type "TemplateFile" of file "ApplicationPage1.aspx" in Project Item "Layouts" is not compatible with a Package in a Sandboxed Solution.
The Project Item "Layouts" cannot be deployed through a Package in a Sandboxed Solution.
Package validation failed."
Besides, even if I can successfully activate the .wsp file, I am not sure if the application page can be added to the Layout folder. Because I don't know how the .wsp file locate and find my application page? It doesn't have the page in it. Can anyone explain a bit on it?
Thanks for your answers.
1) It's strongly recommended that you use powershell to run your test and production deployments: http://dotnet.sys-con.com/node/1208275
2) Try changing your SharePoint solution to a farm solution and repackaging your wsp.
3) By right clicking on your project in visual studio and adding the mapped Layouts folder the solution packaging handles placing any application pages/user controls that you have in the appropriate directory inside your wsp.

The type or namespace name 'Script' does not exist in the namespace 'System.Web'

I just deployed a website into IIS 7 (about which I am woefully ignorant), and upon trying to build the site, I receive this error. I did a little googleing and I saw an article that said I should put system.web.extensions.dll into the /bin. But, I also saw an article saying not to do that. I tried it anyway, but I just received a different error ('Resource cannot be found').
I am totally clueless as to what else to try
Can you use the "Publish" command in Visual Studio to publish directly to the site? If not, then use that command to publish to a similar site on your machine, then copy it to the customer site.
You should also look into the IIS Web Deployment Tool. It can copy an entire site, including IIS settings and any databases. It will be built into VS2010.
Go to control panel, then programs, turn windows features on or off, scroll down to Microsoft.net framework 3.5.1 expand, make sure both sub options are selected, this might help your issue.

Resources