Quantcast
Channel: RazorGenerator Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 525

Commented Unassigned: Enable-RazorGenerator Throws Exception [116]

$
0
0
### Issue

Running the `Enable-RazorGenerator` command from the Package Manager Console emits the following error for each `.cshtml` file in the project.

Exception calling "GetItem" with "1" argument(s): "Value does not fall within the expected range."
At C:\{path}\{to}\packages\RazorGenerator.Mvc.2.1.1\tools\RazorGenerator.psm1:63 char:46
+ $solutionExplorer.GetItem <<<< ("$SolutionName\$ProjectName$relativePath").UIHierarchyItems.Expanded = $false
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException

I expected to be greeted with a success message or no output at all.

### Reproduction

1. In Visual Studio (I have VS Permium 2012 Version 11.0.60315.01 Update 2) install the RazorGenerator extension (I used version 1.5.5)
2. File > New Project > C#/MVC 4 > Internet Application
3. Install `RazorGenerator.Mvc` (I have version 2.1.1)
4. In the Package Manager Console run `Enable-RazorGenerator`

#### Related Issue?

Interestingly enough, `*.generated.cs` files are still created- however the solution won't build. I'm get the following compilation error:

The type or namespace name 'AuthenticationClientData' could not be found (are you missing a using directive or an assembly reference?)

For the file `C:\{path}\{to}\Views\Account\_ExternalLoginsListPartial.generated.cs`, line `33` column `93`.

This may be a ripple effect from the `GetItem` exception above, so I won't open it as its own issue. If it is in fact a separate issue, let me know and I'll move this to a another thread.

Comments: I don't get that GetItem() error with those same steps. I do get the second error, and it is unrelated. It's a minor namespace issue (which we should fix!). To solve it, add this to Views\web.config: <add namespace="Microsoft.Web.WebPages.OAuth" /> And then run Redo-RazorGenerator. So I don't know about the first error you got, but I'm going to guess that it's harmless. Do you get it consistently if you rerun the command, or run Redo-RazorGenerator?

Viewing all articles
Browse latest Browse all 525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>