Tallan's Technology Blog

Tallan's Top Technologists Share Their Thoughts on Today's Technology Challenges

Posts Tagged "Microsoft Visual Studio 2012"

SharePoint 2013 Visual Web Part Auto Generated Files

Brian Feldmann

As you may already know, SharePoint allows developers to create custom web parts a few different ways. You can create a web part through code using the Visual Studio Web Part Template or you can create it with a Visual Web Part Template. The Visual Web Part templates are nice because they allow you to use user controls (.ascx) files to generate your markup.
If you’ve ever created one of these Visual Web parts you’ve probably noticed that there is a code behind .ascx.cs file and another odd file with a ascx.g.cs extension. This .asxc.g.cs file is automatically generated by Visual Studio and is quite important. Every time you make an update or change the .ascx file and then press save, Visual Studio pushes those updates into this auto-generated file. The .ascx control is never actually deployed; instead the code files are packaged…

Web.Config Transforms Per Build

Rob Rastelli

Since the introduction of .Net 4.0, Visual Studio 2012 has supported Web.Config transforms.  That is you can publish a Web.Config file per solution configuration in Visual Studio.  This is great if you are attempting to deploy to different environments that would require different settings such as Connection Strings or AppSettings.  However, it is limited to only the Publish Feature.  With this trick you can configure Visual Studio 2012 to perform the Transform with every build.  This would allow you to run your local development environment against other configurations.  One reason for wanting to do this might be to debug a data issue in a QA Environment.