Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A namespace cannot directly contain members such as fields or methods #79

Open
bdelaney opened this issue Mar 6, 2013 · 7 comments
Open

Comments

@bdelaney
Copy link

bdelaney commented Mar 6, 2013

This error on build out of the Nuget Templates package, ControllerWithContext.tt showing a .cs output and that is source of error.
Used latest Nuget packages (all 3) in an MVC4 project, Empty template.
This occurred after the recommended project close and reopen.

Deleted the ControllerWithContext.cs output file and build works.

After installing the 3 NuGet packages, Package Manager GUI shows 4 packages, all are 1.0.90 version. Makes sense as I look at packages.config file and note what has been installed:




Looking forward to checking it out further.

@serra
Copy link
Contributor

serra commented Mar 7, 2013

There seems to be missing some relevant information from your bug report. What has been installed?

@MilkyWayJoe
Copy link

I'm having the exact same issue.

I am using the MVC4 Internet Application Template.

I've installed the packages in this order:

PM> install-package twitter.bootstrap.mvc4
PM> install-package twitter.bootstrap.mvc4.sample
PM> install-package twitter.bootstrap.mvc4.templates
PM> install-package twitter.bootstrap.mvc4.templates.htmlhelpers

By the time it installed the "templates" I could see 3 items in my errors list:
Untitled

I have installed the HTML Helpers with no problems

@serra
Copy link
Contributor

serra commented Mar 9, 2013

Hmm, I'll try this out. By twitter.bootstrap.mvc4.templates.htmlhelpers, I assume you mean twitter.bootstrap.mvc4.htmlhelpers? Note that the htmlhelpers package already should be installed with the sample too.

@serra
Copy link
Contributor

serra commented Mar 9, 2013

This is because the custom template of CodeTemplates\AddController\ControllerWithContext.tt is not cleared.

Workaround for now ( @bdelaney and @MilkyWayJoe ) is to simply clear the Custom Tool in the file property window.

This is a valid bug report though - afaik the Custom Tool property was automatically cleared in earlier releases.

@serra
Copy link
Contributor

serra commented Mar 9, 2013

Correction: I fixed this as part of #29, but that is pull request is still open. @erichexter or @MisterJames please consider merging #29.

@erichexter
Copy link
Owner

Im traveling and will be iffline foe the next two weeks.

James can you apply the pr?
On Mar 9, 2013 8:41 AM, "Marijn van der Zee" [email protected]
wrote:

Related: #29https://github.com/erichexter/twitter.bootstrap.mvc/issues/29and
#57 #57.


Reply to this email directly or view it on GitHubhttps://github.com//issues/79#issuecomment-14664038
.

@MilkyWayJoe
Copy link

@serra yeah, I wrote it incorrectly here, but I've actually installed twitter.bootstrap.mvc4.htmlhelpers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants