Compile A MVC Project Using MSBuild?

Feb 3, 2010

How do I compile an ASP.Net MVC project using MSBuild? We use a Continuous Integration server to compile and deploy our applications. To keep things simple I created an MVC 1.0 project in VS2008. I immediately created an MSBuild script file to compile it. I did not change any code in the project. The MSBuild script contained the following target.

<AspNetCompiler
VirtualPath="/"
PhysicalPath="C:Developmentmvc1"
TargetPath="c:publishxxx"
Force="true"
Debug="false"
Updateable="true"

The MVC project sln file is contained in the c:developmentmvc1 directory.I am running XP/Pro.I am receiving an error ASPCONFIG: it is an error to use a section registered as allowDefintion='MachineToApplication' beyond application level.

I removed the authenication mode, membership provider, etc. from the web config file until I finally saw a different error message.I am now receiving an error message saying that the file '/views/shared/site.master' does not exist.

View 3 Replies


Similar Messages:

Building A .net 1.1 Project Using Msbuild?

Dec 7, 2010

The Web project we are working on is built against .net 1.1 framework.We would like to automate the build process for this project by using msbuild.However MSBuild only targets 2.0 framework. So how can this be done if we like to use MSBuild or MSBEE(this asks us to convert the web project to new version by opening up in Visual studio IDE)?We cannot convert the project to suit to 2.0 framework

View 1 Replies

Building A Project With MSBuild Which Has Only Class Files Without A Main Method?

Dec 7, 2010

I have a project which contains only .vb files. It doesn't include a suitable main() method to detect the entry point?

View 1 Replies

MaskedEditExtender / How To Compile Project

Jan 6, 2011

Microsoft JScript runtime error: 'undefined' is null or not an object:

And it worked fine with the ajaxcontroltoolkit 3.01

Now on 3.5 i gives problems.

Ok this is a reported bug so the solution(supposedly) is this:

[URL]

how do i compile the project.try to run the AjaxControlToolkit.VS2008.sln and errors pop out form everywhere.Is the dll available with the fix somewhere?

View 11 Replies

A Project Build But Not Compile?

Jan 3, 2010

I've noticed that my project builds successfully when I hit F6.But when I run it with F5 the compilation errors in my C# surface.Why is this?Is it because the JIT compilation happens when I debug with F5 but not when I build with F6?

View 6 Replies

Compile Web Application Project Ascx Into Dll?

May 10, 2010

Is it possible to compile a web application project .ascx (user control) into a dll?I want to do the following:Use the same control in multiple websitesEmbed css and .js as resources into the controlBe able to update super easy. If the user control updates, I just want to update 1 .dllI have successfully followed this article, [URL]However, that uses web site projects, and I cannot embed js css as resources into web site projects.

View 3 Replies

Auto Compile Sub Project Of A Website Solution?

Feb 25, 2010

Is to possible to make a configuration entry (web.config). That automatically compiles a referenced project(for example a class library) when the site runs? This would be easier for me to maintain on my hosting server. Otherwise i have to always recompile the files and upload them again for every small change.

View 1 Replies

Visual Studio 2005 - Web Site Project - Errors Not Caught At Compile Time?

May 7, 2010

For the first time in my career, I'm working on an ASP.Net (v3.5) project that has been set up as a Visual Studio 2008/10 Web Site Project.

I'm not keen on this way of working this way for various reasons but for the moment and until such time as the company sees the virtue in working in an environment with namespaces, designer and project files etc., I have to continue with the existing codebase.

I've run into some odd issues since I began this but perhaps the oddest one of all is that althought VS lets me build the code, it doesn't reliably pick up compilation errors so these are not noticed until runtime.

I know the website model allows dynamic/hot compilation when a request is made for a specific but I can't see why it wouldn't do this when I manually (F5) build/rebuild the project. Its immensely annoying as you can imagine and I can't find a workaround.

View 3 Replies

Visual Studio :: Web Project Converted From 2005 To 2010 Gets Dynamic Compile Error On The @Page Directive?

Jan 12, 2011

As that title says my aspx page shows a compile error on the @Page directive that says "ASP.NET runtime error: Cannot load file or Assembly 'Microsoft.SqlServer.BatchParser' or one of it's dependencies". The project compiles with our error and it runs with no problem. The only real problem that this causes it that the intellisense for anything other than simple HTML is broken so I can't type asp:Controlname and have intellisense show me a the list of items or properties in a control. I get a green squiggly line under all the asp tags saying "Unrecognized tag prefix or device filter 'asp'". This project doesn't directly use SQL SMO but it does reference a project that does. However, I removed that reference and the problem still doesn't go away. I have installed on my development machine the full SQL client and for both SQL 2005 and 2008 (including the SDK) from the Developer editions of both versions. This was not a problem on VS2005 and the project compiles without error in VS2010 too.

View 1 Replies

Aspx Page Doesn't Compile When Page Is Copied From Another Project?

Feb 22, 2010

I often have an issue with compile errors when I copy over a aspx page and code behind file from another project, it seems to work when I create another page and the content manually but if I just copy the files it won't. I have checked to make sure namespaces and references are ok but still doesn't make any sense. The error I get is "Error The name 'txtUser' does not exist in the current context". I just wanted to understand why.

For e.g I copied over the following :

ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Login" %>
Login
Login

[Code]....

View 4 Replies

Building A Web Application Using Msbuild?

Dec 10, 2010

I have a web application solution with 14 projects which include web services, class libraries, sub-web applications.. can anyone provide a solution on how to get along with an example?

View 1 Replies

Get MSBuild Output From CCNet Api?

Jul 16, 2010

I am building an asp.net shell on top of CCNet 1.5, where I send commands like force build to CCNet through the api. The ThoughtWorks.CruiseControl.Remote namespace has methods to get information from CCNet on the build, like status, elapsed time, etc.I would like to programmatically get the MSBuild task output from the CCNet api, but I haven't seen any methods for this. Is it at all possible? Or do I need to scan output files on disk or something?

View 2 Replies

Retrieve The Full Output From A Web Application With MSBuild

Jan 12, 2010

I have a misunderstanding with MSBuild. I want to build a web application (with a traditional .csproj project file) and get the "entire output" of the build in a new, clean output folder - including all the website files that are included in the project with <Content Include="....

The AspNetCompiler utility makes this easy for "web site" style projects - you specify the input folder and the output folder, and they can be entirely different.

So far I've only had success specifying the OutoutPath folder, i.e. moving the bin folder - but this only gives me the binaries and ignores aspx, image files, etc.

View 1 Replies

How To Use Nant And MSBuild To Build Debug Deployment

Jun 17, 2010

I have a Nant build script which referrences 30 other build scripts.

Each build script referrences a visual studio solution using MSBuild.

Each solution has 3 to 5 projects in.

Some projects are Class Librarys and some are Web Apllications.

The projects reference other projects both in their solution and out of their solution, so the projects do not use project references, they reference the the Release DLLs in the Bin folders of the other projects.

To use the software, I need to publish all the solutions together.

Which means I cannot do a deployment which is in debug mode.

Which means I cannot the step into and debug the code.

I would like to run the build script to get a deployment of the software which I can debug.

View 1 Replies

Configuration :: How To Use Msbuild To Create MSI Files Or Setup

May 27, 2010

I want to Use MSBUILD to create MSI Files or setup. Can I do it programetically.

View 1 Replies

MSBuild: Automate Collecting Of Db Migration Scripts?

May 20, 2010

Asp.net web application (source stored in svn) sqlserver database. (Database schema (tables/sprocs) stored in svn) db version is synced with web application assembly version. (stored in table 'CurrentVersion')CI hudson server that checks out web app from repo and runs custom msbuild file to publish/package app.

My msbuild script updates the assembly version of the web app (Major.Minor.Revision.Build) on each build. The 'Revision' is set to the currently checked out svn revision and the 'Build' to the hudson build number (incremented on each automated build).

This way i can match the app to a specific trunk revision also get other build stats from the hudson build number.

I'd like to automate the collecting of migration scripts (updated sprocs etc) to add to the zip package. I guess by comparing the svn revision of the db that has yet to be deployed to, to the revision being deployed, i can find what db files have changed in the trunk since the last deployment to that database/environment.

This could easily be achieved by manually calling the svn diff -r REVNO:REVNO command to list changed .sql files. These files could then manually have to be added to the package.
It would be great if this could be automated.

Firstly i'd imagine I'll have to write a custom task to check the version of the db that has yet to be deployed to. After that I'm quite unsure. how this would be achieved through an msbuild task either existing or custom?

Finally I'll have to autogen a script to add to the package that updates the database version table so as to be in sync with the application.

View 3 Replies

Visual Studio :: Unable To Use Web Deployment MSBuild V10 With AspNetMerge .NET 4

Jul 8, 2010

I am using Web Deployment v10.0 RTW and .NET Framework version 4.0 MSBuild.

There were some problems with incorrect settings and resulting in errors. I had to pass in my own values in order to continue to the next step:

[Code]....

With the above setting, it builds in .NET 4.0 instead of 2.0, but I am having trouble with AspNetMerge:

[Code]....

I was able to solve the above error by changing this inMSBuildMicrosoftWebDeploymentv10.0Microsoft.WebDeployment.targets:

[Code]....

But soon came to another error:

[Code]....

So I changed some more to make it work:

[Code]....

But again hit with another error but this one I can't solve:

(AspNetMerge target) ->

aspnet_merge : error 1008: The PrecompiledApp.config file is missing. Make sure the application has been precompiled with the Aspnet_compiler tool.

View 3 Replies

How To Setup A Development Environment Using Msbuild And Continuious Integration

Jul 6, 2010

I need to set up a developement environment using msbuild and continuious integration, NUnit etc. I am quite new to this kind of thing as it is normally already set up in most environments ive worked in. I am quite short of time as well and dont have have the time to read huge volumes in order to get an understanding (developement starts Monday next week) so need to get this up and running asap in the shortest possible time. Does anyone have a working sample I can utilise or a short tutorial that breaks this process down?

View 1 Replies

Installation :: Include An External Script For Execution In MSBuild.exe?

Mar 3, 2011

I have onle xml file which contain msbuild tags, means few task and I want to execute this file rather then .csproj file.

View 2 Replies

MSBuild Failing To Build Referenced Projects When Upgrading To VS2010?

Dec 8, 2010

I have recently upgraded my .Net 3.5 solution containing some C# code projects and a ASP.net web site project to VS2010 (from VS2008). It is building and running fine inside VS, but I get some problems when trying to build it on my server with MSBuild 4.0 via TeamCity. It seems like the projects that are referenced from the web site are not built. This was all working fine before I upgraded to VS2010, MSbuild 4.0 and Windows SDK 7.1.

Inside the msbuild script that I use to build from teamcity I have defined project references for the web site like this:

[code]...

When I try to run the build script I get an error message saying that it could not find the dll file when trying to copy it from the bin folder of the referenced project into the bin folder of the web site. This is happening because the referenced projects are in fact never built at all (No bin folder exists in the project dir).

I am not very experienced with MSbuild, so I may have overlooked some important stuff. Is it not so that MSbuild will automatically try to build the referenced projects if no project output is existing?

View 1 Replies

How To Get Code Coverage Working On A VS 2010 Project/Cannot Initialize The Project 'Project Name'

May 23, 2010

When I turn on Code Coverage in my test settings, on a project that references the Unity DI container I get the following error:

Cannot initialize the ASP.NET project'{Project Name}'.

The event log specifies the following reason:

Could not load file or assembly 'Microsoft.Practices.Unity, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name signature could not be verified.

View 2 Replies

Post Code And Not Compile It Into A Dll?

Feb 19, 2010

is there a way to post asp.net code and not complie it into a dll

I would like to upload only .aspx file and the aspx.vb file. I dont want to compile it into a .dll

is there a setting or something in that I can do so I dont have to compile it?

View 1 Replies

Compile Time Error?

Feb 19, 2011

Am running asp.net application.I try to build sample site using gridview.I got compilation error as below,CS1061: 'ASP.gridedit_aspx' does not contain a definition for 'GridView1_RowUpdated' and no extension method 'GridView1_RowUpdated' accepting a first argument of type 'ASP.gridedit_aspx' could be found (are you missing a using directive or an assembly reference?)

Line 13: <asp:GridView ID="GridView1" runat="server" DataKeyNames="ID"
Line 14: AutoGenerateColumns="False"
Line 15: DataSourceID="SqlDataSource1"

View 1 Replies

Getting Compile Time Error?

Sep 2, 2010

CS0016: Could not write to output file 'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot7529765bd6c35794App_Web_uclogin.ascx.5a9fc98b.zqr8lwaw.dll' -- 'Access is denied. '

View 2 Replies

C# Compile Time For Last Updated?

Oct 30, 2010

I have a website and I want to include a "Last Compile Time: XX:XX:XX" in the footer of the website. Is there an automated way to alter the contents of an asp:label at compile time?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved