Publishing for Web Applications from MSBuild

A search on this topic yields many answers for all the different possible combinations of Visual Studio web projects. Here is another.

Using .Net 3.5 MSBuild.exe take note of the following targets and the custom parameter, WebProjectOutputDir, passed when attempting to publish a web application project.

  • /t:ResolveReferences;_WPPCopyWebApplication
  • /p:WebProjectOutputDir=”c:\\Source\\Build\\My Web App\\” – this is the path to the output directory, all ‘\’ must be replaced with ‘\\’

A complete call will look something like this:

msbuild.exe MyWebApplication.csproj /p:Configuration=Release /t:ResolveReferences;_WPPCopyWebApplication /p:WebProjectOutputDir=”c:\Source\Build\My Web App”

The custom tool ‘MSLinqToSQLGenerator’ failed. Unspecified error

There is an issue in SP1 for Visual Studio 2008. If you have a partial class with Using statement at the top of the file for a Linq-To-SQL Data Classes context object. You will get above error. Visual Studio will delete the corresponding “.designer.cs” file for your data context and nothing will be compiled.

To solve this issue, you may have to move “Using” statements inside namespace declaration. This is a workaround provided by Microsoft.

MSExam 70-448 Part 5: KPI Trend Expression correction

Seems like the following trend expression isn’t quite correct in Chapter 6 > Lesson 2 > Exercise 2.

([Measures].[Reseller Sales Amount] - 
([Order Date].[Calendar].PrevMember, [Measures].[Reseller Sales Amount]))/
[Measures].[Reseller Sales Amount]

[Order Date] should be [Date] as previously there were instructions to rename [Order Date] as [Date]. This one is correct:

([Measures].[Reseller Sales Amount] - 
([Date].[Calendar].PrevMember, [Measures].[Reseller Sales Amount]))/
[Measures].[Reseller Sales Amount]

MSExam 70-448 Part 3: Chapter 4 dtExecUI

Seeing this error? “Could not find stored procedure ‘msdb.dbo.sp_dts_listpackages'”

Screen shot of dtExecUI 2005 error

Solution: Run the correct version of the dtExecUI tool, in SQL2008 this stored procedure was renamed from the above to sp_ssis_listpackages.

The correct path to the 2008 version of dtExecUI is C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE.

MSExam 70-448 Part 2: Chapter 1 query wrong

Page 52 of the self paced training kit asks you to use the following query:

select convert(nvarchar(15),SC.AccountNumber) as CustomerAlternateKey, 
C.Title, C.FirstName, C.MiddleName, C.LastName, C.Suffix, 
C.EmailAddress, C.AddressLine1, C.AddressLine2, D.BirthDate, 
D.MaritalStatus, D.YearlyIncome, D.DateFirstPurchase, D.Gender, 
D.TotalChildren, D.NumberChildrenAtHome, D.Education, 
D.Occupation, D.HomeOwnerFlag, D.NumberCarsOwned 
from Sales.vIndividualCustomer C inner join Sales.Customer SC 
on C.BusinessEntityID = SC.PersonID 
inner join Sales.vIndividualDemographics D 
on C.BusinessEntityID = D.BusinessEntityID

It didn’t work for me , however this did (BusinessEntityID column replaced with CustomerID in the joins):

select convert(nvarchar(15),SC.AccountNumber) as CustomerAlternateKey, 
C.Title, C.FirstName, C.MiddleName, C.LastName, C.Suffix, 
C.EmailAddress, C.AddressLine1, C.AddressLine2, D.BirthDate, 
D.MaritalStatus, D.YearlyIncome, D.DateFirstPurchase, D.Gender, 
D.TotalChildren, D.NumberChildrenAtHome, D.Education, 
D.Occupation, D.HomeOwnerFlag, D.NumberCarsOwned 
from Sales.vIndividualCustomer C inner join Sales.Customer SC 
on C.CustomerID = SC.CustomerID 
inner join Sales.vIndividualDemographics D 
on C.CustomerID = D.CustomerID