[mvc2inaction-discuss] Final code available, ebook end of this week

21 views
Skip to first unread message

Jeffrey Palermo

unread,
May 25, 2010, 11:04:09 AM5/25/10
to mvc2inaction-discuss
The book if finished!  Whew!  The ebook is being assembled and will be finished this week.  Physical copies of the book will launch at the Tech Ed US bookstore.

If anyone has some time, I would appreciate help with a small item.  I have packaged up the code for distribution on the Manning website, but I'd like some of you to download the code and run the CompileAll.ps1 powershell build script to make sure that all the samples compile.  You can access it here:

Thank you all for your feedback.

Best regards,
Jeffrey Palermo

--
--------------------
Please feel free to comment on the progress of the book, the content, and the code samples. All code and text is available on the book's GitHub site at http://github.com/jeffreypalermo/mvc2inaction. We hope developing this book out in the open and with your feedback makes it a great book for the community.

Darek Tarczynski

unread,
May 25, 2010, 11:41:39 AM5/25/10
to mvc2inaction-discuss
On one of my work computer Win2k3 with VS2005, without ASP.NET MVC
installed i'v get a lot of:

Compiling
V:\DEV\AspnetMvc2InAction_code\src\Chapter01\Chapter01.sln
V:\DEV\AspnetMvc2InAction_code\src\Chapter01\GuestBookWithModel
\GuestBookWithModel.csproj(107,11): error MSB4019: The imported
project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio
\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that
the file exists on disk.
V:\DEV\AspnetMvc2InAction_code\src\Chapter01\GuestBook
\GuestBook.csproj(114,11): error MSB4019: The imported project "C:
\Program Files (x86)\MSBuild\Microsoft\VisualStudio
\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that
the file exists on disk.
Compiling
V:\DEV\AspnetMvc2InAction_code\src\Chapter02\ComboModel\ComboModel.sln
V:\DEV\AspnetMvc2InAction_code\src\Chapter02\ComboModel\ComboModel
\ComboModel.csproj(117,11): error MSB4019: The imported project "C:
\Program Files (x86)\MSBuild\Microsoft\VisualStudio
\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that
the file exists on disk.
Compiling
V:\DEV\AspnetMvc2InAction_code\src\Chapter02\DisplayModel
\DisplayModel.sln
V:\DEV\AspnetMvc2InAction_code\src\Chapter02\DisplayModel\DisplayModel
\DisplayModel.csproj(122,11): error MSB4019: The imported project "C:
\Program Files (x86)\MSBuild\Microsoft\VisualStudio
\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that
the file exists on disk.
Compiling
V:\DEV\AspnetMvc2InAction_code\src\Chapter02\InputModel\InputModel.sln
V:\DEV\AspnetMvc2InAction_code\src\Chapter02\InputModel\InputModel
\InputModel.csproj(117,11): error MSB4019: The imported project "C:
\Program Files (x86)\MSBuild\Microsoft\VisualStudio
\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that
the file exists on disk.
Compiling
V:\DEV\AspnetMvc2InAction_code\src\Chapter03\Chapter03.sln
V:\DEV\AspnetMvc2InAction_code\src\Chapter03\AccountProfile
\AccountProfile.csproj(114,11): error MSB4019: The imported project "C:
\Program Files (x86)\MSBuild\Microsoft\VisualStudio
\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that
the file exists on disk.
Compiling
....
....
(the same for all Chapters)

But maybe it can be interesting for you. I will try this on my Dev
machine soon.
Regards
Dariusz Tarczyński

On 25 Maj, 17:04, Jeffrey Palermo <Jeff...@Palermo.cc> wrote:
> The book if finished!  Whew!  The ebook is being assembled and will be
> finished this week.  Physical copies of the book will launch at the Tech Ed
> US bookstore.
>
> If anyone has some time, I would appreciate help with a small item.  I have
> packaged up the code for distribution on the Manning website, but I'd like
> some of you to download the code and run the CompileAll.ps1 powershell build
> script to make sure that all the samples compile.  You can access it here:https://docs.google.com/leaf?id=0B97jYFaBSURzNDViMWMyOWYtZTgwZC00ZDYx...
>
> Thank you all for your feedback.
>
> Best regards,
> Jeffrey Palermo
>
> --
> --------------------
> Please feel free to comment on the progress of the book, the content, and the code samples.  All code and text is available on the book's GitHub site athttp://github.com/jeffreypalermo/mvc2inaction.  We hope developing this book out in the open and with your feedback makes it a great book for the community.

Jeffrey Palermo

unread,
May 25, 2010, 12:25:08 PM5/25/10
to mvc2inacti...@googlegroups.com
Darek,
It does require .Net 3.5 SP1.

Best regards,
Jeffrey Palermo

Darek Tarczynski

unread,
May 25, 2010, 3:32:22 PM5/25/10
to mvc2inaction-discuss
Yes, that's true. It requires 3.5 .NET, but now I'm getting this
messages:
Compiling
D:\DEV\AspNetMVC2_InAction_code\src\Chapter01\Chapter01.sln
D:\DEV\AspNetMVC2_InAction_code\src
\Chapter01\Chapter01.sln.cache(70,5): error MSB4126: The specified
solution configuration "Debug|MCD" is invalid. Please specify a valid
solution configuration using the Configuration and Platform properties
(e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any
CPU") or leave those properties blank to use the default solution
configuration.
Compiling
D:\DEV\AspNetMVC2_InAction_code\src\Chapter02\ComboModel
\ComboModel.sln
D:\DEV\AspNetMVC2_InAction_code\src\Chapter02\ComboModel
\ComboModel.sln.cache(59,5): error MSB4126: The specified solution
configuration "Debug|MCD" is invalid. Please specify a valid solution
configuration using the Configuration and Platform properties (e.g.
MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU")
or leave those properties blank to use the default solution
configuration.
Compiling
D:\DEV\AspNetMVC2_InAction_code\src\Chapter02\DisplayModel
\DisplayModel.sln
D:\DEV\AspNetMVC2_InAction_code\src\Chapter02\DisplayModel
\DisplayModel.sln.cache(59,5): error MSB4126: The specified solution
configuration "Debug|MCD" is invalid. Please specify a valid solution
configuration using the Configuration and Platform properties (e.g.
MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU")
or leave those properties blank to use the default solution
configuration.
Compiling
D:\DEV\AspNetMVC2_InAction_code\src\Chapter02\InputModel
\InputModel.sln
D:\DEV\AspNetMVC2_InAction_code\src\Chapter02\InputModel
\InputModel.sln.cache(59,5): error MSB4126: The specified solution
configuration "Debug|MCD" is invalid. Please specify a valid solution
configuration using the Configuration and Platform properties (e.g.
MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU")
or leave those properties blank to use the default solution
configuration.
Compiling
D:\DEV\AspNetMVC2_InAction_code\src\Chapter03\Chapter03.sln
D:\DEV\AspNetMVC2_InAction_code\src
\Chapter03\Chapter03.sln.cache(59,5): error MSB4126: The specified
solution configuration "Debug|MCD" is invalid. Please specify a valid
solution configuration using the Configuration and Platform properties
(e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any
CPU") or leave those properties blank to use the default solution
configuration.
Compiling
...
(for all chapters)
...

On 25 Maj, 18:25, Jeffrey Palermo <Jeff...@Palermo.cc> wrote:
> Darek,
> It does require .Net 3.5 SP1.
>
> Best regards,
> Jeffrey Palermo
>

Pmillsaps

unread,
May 25, 2010, 2:36:28 PM5/25/10
to mvc2inaction-discuss
I downloaded the source, and ran the powershell script as
administrator. I have VS2010 installed, as well as VS2008. The
compile was successful on all levels. Let me know if you need any
more information.

On May 25, 10:04 am, Jeffrey Palermo <Jeff...@Palermo.cc> wrote:
> The book if finished!  Whew!  The ebook is being assembled and will be
> finished this week.  Physical copies of the book will launch at the Tech Ed
> US bookstore.
>
> If anyone has some time, I would appreciate help with a small item.  I have
> packaged up the code for distribution on the Manning website, but I'd like
> some of you to download the code and run the CompileAll.ps1 powershell build

> script to make sure that all the samples compile.  You can access it here:https://docs.google.com/leaf?id=0B97jYFaBSURzNDViMWMyOWYtZTgwZC00ZDYx...


>
> Thank you all for your feedback.
>
> Best regards,
> Jeffrey Palermo
>
> --
> --------------------

> Please feel free to comment on the progress of the book, the content, and the code samples.  All code and text is available on the book's GitHub site athttp://github.com/jeffreypalermo/mvc2inaction.  We hope developing this book out in the open and with your feedback makes it a great book for the community.

hugob

unread,
May 25, 2010, 1:47:10 PM5/25/10
to mvc2inaction-discuss

Hello Jeffrey

I am completely new to MVC2 (sounds like a good test candidate). I
have some experience with Castle (MonoRail and Windsor). Plus some
NHibernate experiecence. So I downloaded the code and installed it.
The results are below.
(No, I did not use a floppy drive).

Hugo Burm
Yall


Results:
========

Step 1
Installed AspNet MVC 2 on Visual Studio 2008 SP1 from the Lib map in
the download.
Result: OK

Step 2
Started VS 2008 and checked that the MVC 2 template is available when
starting a new project
Result: OK
Closed VS 2008.

Step 3
Started Powershell (V2 CTP2)
Executed .\CompileAll.ps1
Result: Everything seems OK, No errors reported. See results below.
Note: PS cannot execute scripts by default. You have to execute “set-
ExecutionPolicy  RemoteSigned “ or something similar. Most of us did
that long time ago. But new users may be puzzled.

Step 4
Inspected Chapter21 (the NHibernate chapter). An AreasExample.dll was
created in the bin map.
Started Chapter21.sln and pressed F5. Website was presented OK. But
when I tried to register, there was a problem with the membership
provider. I guess I have to read the book, change a connection
string, and run the SQL script that creates the membershipprovider
tables.

So as far as I can see, everythings seems OK.


PS Results
========

PS A:\aspnetmvc2inaction_code> ls


Directory: Microsoft.PowerShell.Core\FileSystem::A:
\aspnetmvc2inaction_code


Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 16-5-2010 21:25 lib
d---- 16-5-2010 21:25 src
-a--- 16-5-2010 21:25 376 CompileAll.ps1


PS A:\aspnetmvc2inaction_code> .\CompileAll.ps1
Compiling
A:\aspnetmvc2inaction_code\src\Chapter01\Chapter01.sln
Compiling
A:\aspnetmvc2inaction_code\src\Chapter02\ComboModel\ComboModel.sln
Compiling

[... Removed similar messages ... ]

PS A:\aspnetmvc2inaction_code>


On 25 mei, 17:04, Jeffrey Palermo <Jeff...@Palermo.cc> wrote:
> The book if finished!  Whew!  The ebook is being assembled and will be
> finished this week.  Physical copies of the book will launch at the Tech Ed
> US bookstore.
>
> If anyone has some time, I would appreciate help with a small item.  I have
> packaged up the code for distribution on the Manning website, but I'd like
> some of you to download the code and run the CompileAll.ps1 powershell build

> script to make sure that all the samples compile.  You can access it here:https://docs.google.com/leaf?id=0B97jYFaBSURzNDViMWMyOWYtZTgwZC00ZDYx...


>
> Thank you all for your feedback.
>
> Best regards,
> Jeffrey Palermo
>
> --
> --------------------

> Please feel free to comment on the progress of the book, the content, and the code samples.  All code and text is available on the book's GitHub site athttp://github.com/jeffreypalermo/mvc2inaction.  We hope developing this book out in the open and with your feedback makes it a great book for the community.

Stephen Bohlen

unread,
May 25, 2010, 4:29:03 PM5/25/10
to mvc2inaction-discuss
"Works on My Machine"
  • Win7 x64
  • VS 2008 SP1
  • VS 2010 RTM

Steve Bohlen
sbo...@gmail.com
http://blog.unhandled-exceptions.com
http://twitter.com/sbohlen
works-on-my-machine-starburst_3.png

Michael Hanney

unread,
May 25, 2010, 12:53:29 PM5/25/10
to mvc2inacti...@googlegroups.com
I confirm it works on Windows Server 2008 Standard, Service Pack 2,
Powershell 1.0, .NET 3.5.

Mike.


On Tue, May 25, 2010 at 8:04 AM, Jeffrey Palermo <Jef...@palermo.cc> wrote:

Message has been deleted

Darek Tarczynski

unread,
May 25, 2010, 5:49:45 PM5/25/10
to mvc2inaction-discuss
Still doesn't work on my machine, for clarification I have installed:
- VS2010
- VS2008
- Win7 (PL)

I ran script as Administrator and getting error:


error MSB4126: The specified solution
configuration "Debug|MCD" is invalid. Please specify a valid solution
configuration using the Configuration and Platform properties (e.g.
MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU")
or leave those properties blank to use the default solution
configuration.

On 25 Maj, 17:04, Jeffrey Palermo <Jeff...@Palermo.cc> wrote:
> The book if finished!  Whew!  The ebook is being assembled and will be
> finished this week.  Physical copies of the book will launch at the Tech Ed
> US bookstore.
>
> If anyone has some time, I would appreciate help with a small item.  I have
> packaged up the code for distribution on the Manning website, but I'd like
> some of you to download the code and run the CompileAll.ps1 powershell build

> script to make sure that all the samples compile.  You can access it here:https://docs.google.com/leaf?id=0B97jYFaBSURzNDViMWMyOWYtZTgwZC00ZDYx...


>
> Thank you all for your feedback.
>
> Best regards,
> Jeffrey Palermo
>
> --
> --------------------

> Please feel free to comment on the progress of the book, the content, and the code samples.  All code and text is available on the book's GitHub site athttp://github.com/jeffreypalermo/mvc2inaction.  We hope developing this book out in the open and with your feedback makes it a great book for the community.

Thanh Dao

unread,
May 25, 2010, 6:56:51 PM5/25/10
to mvc2inaction-discuss
It compiles without any problem on my computer. Got the following on
it:

- Windows XP SP3
- .NET Framework 4.0
- ASP.NET MVC 2 RTM
- Visual Studio 2010
- Visual Studio 2008

On May 25, 5:04 pm, Jeffrey Palermo <Jeff...@Palermo.cc> wrote:
> The book if finished!  Whew!  The ebook is being assembled and will be
> finished this week.  Physical copies of the book will launch at the Tech Ed
> US bookstore.
>
> If anyone has some time, I would appreciate help with a small item.  I have
> packaged up the code for distribution on the Manning website, but I'd like
> some of you to download the code and run the CompileAll.ps1 powershell build

> script to make sure that all the samples compile.  You can access it here:https://docs.google.com/leaf?id=0B97jYFaBSURzNDViMWMyOWYtZTgwZC00ZDYx...


>
> Thank you all for your feedback.
>
> Best regards,
> Jeffrey Palermo
>
> --
> --------------------

> Please feel free to comment on the progress of the book, the content, and the code samples.  All code and text is available on the book's GitHub site athttp://github.com/jeffreypalermo/mvc2inaction.  We hope developing this book out in the open and with your feedback makes it a great book for the community.

Jeffrey Palermo

unread,
May 26, 2010, 9:36:30 AM5/26/10
to mvc2inacti...@googlegroups.com
Darek,
If you are having this problem, another reader will as well.  Would you mind replacing the command in CompileAll.ps1 with the following?

foreach($file in get-childitem -filter *.sln -recurse)
{
    echo Compiling $file.FullName
    \Windows\Microsoft.NET\Framework\v3.5\msbuild.exe /t:build /p:Platform="Any CPU" /v:q /nologo $file.FullName
}


I added the /p switch because of this:

Best regards,
Jeffrey Palermo


Please feel free to comment on the progress of the book, the content, and the code samples.  All code and text is available on the book's GitHub site at http://github.com/jeffreypalermo/mvc2inaction.  We hope developing this book out in the open and with your feedback makes it a great book for the community.

Darek Tarczynski

unread,
May 26, 2010, 1:41:53 PM5/26/10
to mvc2inaction-discuss
Now Im getting:

Compiling
C:\AspNetMVC2_InAction_code\src\Chapter01\Chapter01.sln
Compiling
C:\AspNetMVC2_InAction_code\src\Chapter01\Backup\Chapter01.sln
Controllers\AccountController.cs(72,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPost" (czy nie brakuje
dyrektywy "using" lub odwołania do zestawu?).
Controllers\AccountController.cs(72,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPostAttribute" (czy nie
brakuje dyrektywy "using" lub odwołania do zestawu?).
Controllers\AccountController.cs(108,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPost" (czy nie brakuje
dyrektywy "using" lub odwołania do zestawu?).
Controllers\AccountController.cs(108,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPostAttribute" (czy nie
brakuje dyrektywy "using" lub odwołania do zestawu?).
Controllers\AccountController.cs(142,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPost" (czy nie brakuje
dyrektywy "using" lub odwołania do zestawu?).
Controllers\AccountController.cs(142,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPostAttribute" (czy nie
brakuje dyrektywy "using" lub odwołania do zestawu?).
Controllers\GuestBookController.cs(14,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPost" (czy nie brakuje
dyrektywy "using" lub odwołania do zestawu?).
Controllers\GuestBookController.cs(14,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPostAttribute" (czy nie
brakuje dyrektywy "using" lub odwołania do zestawu?).
Controllers\AccountController.cs(72,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPost" (czy nie brakuje
dyrektywy "using" lub odwołania do zestawu?).
Controllers\AccountController.cs(72,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPostAttribute" (czy nie
brakuje dyrektywy "using" lub odwołania do zestawu?).
Controllers\AccountController.cs(108,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPost" (czy nie brakuje
dyrektywy "using" lub odwołania do zestawu?).
Controllers\AccountController.cs(108,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPostAttribute" (czy nie
brakuje dyrektywy "using" lub odwołania do zestawu?).
Controllers\AccountController.cs(142,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPost" (czy nie brakuje
dyrektywy "using" lub odwołania do zestawu?).
Controllers\AccountController.cs(142,10): error CS0246: Nie można
odnaleźć nazwy typu lub obszaru nazw "HttpPostAttribute" (czy nie
brakuje dyrektywy "using" lub odwołania do zestawu?).
Compiling
C:\AspNetMVC2_InAction_code\src\Chapter02\ComboModel\ComboModel.sln
Compiling
....
Other chapters OK
...

It's localized message, but this message in English means: The type or
namespace name 'HttpPost' could not be found. and The type or
namespace name 'HttpPostAttribute' could not be found.

On 26 Maj, 15:36, Jeffrey Palermo <Jeff...@Palermo.cc> wrote:
> Darek,
> If you are having this problem, another reader will as well.  Would you mind
> replacing the command in CompileAll.ps1 with the following?
>
> foreach($file in get-childitem -filter *.sln -recurse)
> {
>     echo Compiling $file.FullName
>     \Windows\Microsoft.NET\Framework\v3.5\msbuild.exe /t:build
> /p:Platform="Any CPU" /v:q /nologo $file.FullName
>
> }
>

> I added the /p switch because of this:http://www.codewrecks.com/blog/index.php/2008/02/13/nant-and-the-spec...
>
> Best regards,
> Jeffrey Palermo

Reply all
Reply to author
Forward
0 new messages