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

Commented Issue: Reading config section in MvcConfigTransform does not locate Razor binaries [120]

$
0
0
From http://stackoverflow.com/questions/17863627/msbuild-cannot-find-a-dll-that-has-been-bindingredirectd-via-web-config

It seems that despite loading the System.Web.* binaries into the AppDomain, invoking the WebConfigurationManager complains about not being able to find the binaries
Comments: Thanks for the quick fix!

Created Unassigned: RazorGenerator not compiling (MVC) [121]

$
0
0
Maybe someone can give me some hints on how to find out more. It does run the code in App_Start when a view is requested. It just won't create the cs file for the view when the RazorGenerator is specified under Custom Tool. I just moved to a new Windows 7 box and did a sync with TFS to get the same code. The old box still works. The versions are the same (was 2.0.1 but just tried 2.1.1).

Clues?

Commented Unassigned: RazorGenerator not compiling (MVC) [121]

$
0
0
Maybe someone can give me some hints on how to find out more. It does run the code in App_Start when a view is requested. It just won't create the cs file for the view when the RazorGenerator is specified under Custom Tool. I just moved to a new Windows 7 box and did a sync with TFS to get the same code. The old box still works. The versions are the same (was 2.0.1 but just tried 2.1.1).

Clues?
Comments: Do you have the RazorGenerator vsix installed? if so, what happens once you set the Custom Tool, right click on the cshtml file in Solution Explorer and execute "Run Custom Tool"

Commented Unassigned: RazorGenerator not compiling (MVC) [121]

$
0
0
Maybe someone can give me some hints on how to find out more. It does run the code in App_Start when a view is requested. It just won't create the cs file for the view when the RazorGenerator is specified under Custom Tool. I just moved to a new Windows 7 box and did a sync with TFS to get the same code. The old box still works. The versions are the same (was 2.0.1 but just tried 2.1.1).

Clues?
Comments: Thanks, I just needed to install the vsix on the new box.

Created Unassigned: Could not precompile the input file contents... [122]

$
0
0
I'm getting the following error on build...

Could not precompile the input file contents. Ensure that a generator declaration exists in the cshtml file.
A generator declaration is the first line of your cshtml file and looks like this:
@* Generator: MvcHelper *@
Valid host names: MvcHelper, MvcView, Template, WebPagesHelper, WebPage, RazorGenerator.Core.IHostProvider

I posted this issue under Discussions, but am opening up an issue so I can attach a sample project. The error occurs as soon as I drop a _ViewStart.cshtml file into the root of my project.

Created Unassigned: RazorGenerator build fails if RazorSrcFiles are specified in project [123]

$
0
0
After the May changes to RazorGenerator.target for Work Item 59, the build fails if the csproj manually specifies the list of cshtml files to precompile. This is because the RazorOutputFiles list is built using %(RecursiveDir) which is missing if you specify the source file in the standard csproj format like <RazorSrcFiles Include="Views\Home\NewUser.cshtml" />. This is because RecursiveDir only pays attention to the ** part of the include which is not present when the files are manually included. I believe the way to fix it is to use %(RelativeDir) instead of %(RecursiveDir).

Created Unassigned: PrecompiledMvcEngine baseVirtualPath causing exception [124]

$
0
0
Hi,

I have supplied a baseVirtualPath value of "Areas/Reporting" which throws the error:

The relative virtual path '~Views/home/Index.cshtml' is not allowed here.

Any ideas?

Edited Unassigned: PrecompiledMvcEngine baseVirtualPath causing exception [124]

$
0
0
I have supplied a baseVirtualPath value of "Areas/Reporting" which throws the error:

The relative virtual path '~Views/home/Index.cshtml' is not allowed here.

I have traced it to IsPhysicalFileNewer Method:

private bool IsPhysicalFileNewer(string virtualPath)
{
if (virtualPath.StartsWith(_baseVirtualPath ?? String.Empty, StringComparison.OrdinalIgnoreCase))
{
// If a base virtual path is specified, we should remove it as a prefix. Everything that follows should map to a view file on disk.
if (!String.IsNullOrEmpty(_baseVirtualPath))
{
virtualPath = "~" + virtualPath.Substring(_baseVirtualPath.Length);
}

Attaching a "/" to the tilde creates a correct virtual path.

virtualPath = "~/" + virtualPath.Substring(_baseVirtualPath.Length);

Can this be verified?

Edited Unassigned: PrecompiledMvcEngine baseVirtualPath causing exception [124]

$
0
0
I have supplied a baseVirtualPath value of "Areas/Reporting" which throws the error:

The relative virtual path '~Views/home/Index.cshtml' is not allowed here.

I have traced it to IsPhysicalFileNewer Method:

```
private bool IsPhysicalFileNewer(string virtualPath)
{
if (virtualPath.StartsWith(_baseVirtualPath ?? String.Empty, StringComparison.OrdinalIgnoreCase))
{
// If a base virtual path is specified, we should remove it as a prefix. Everything that follows should map to a view file on disk.
if (!String.IsNullOrEmpty(_baseVirtualPath))
{
virtualPath = "~" + virtualPath.Substring(_baseVirtualPath.Length);
}
```

Attaching a "/" to the tilde creates a correct virtual path.

```
virtualPath = "~/" + virtualPath.Substring(_baseVirtualPath.Length);
```

Can this be verified?

Closed Unassigned: PrecompiledMvcEngine baseVirtualPath causing exception [124]

$
0
0
I have supplied a baseVirtualPath value of "Areas/Reporting" which throws the error:

The relative virtual path '~Views/home/Index.cshtml' is not allowed here.

I have traced it to IsPhysicalFileNewer Method:

```
private bool IsPhysicalFileNewer(string virtualPath)
{
if (virtualPath.StartsWith(_baseVirtualPath ?? String.Empty, StringComparison.OrdinalIgnoreCase))
{
// If a base virtual path is specified, we should remove it as a prefix. Everything that follows should map to a view file on disk.
if (!String.IsNullOrEmpty(_baseVirtualPath))
{
virtualPath = "~" + virtualPath.Substring(_baseVirtualPath.Length);
}
```

Attaching a "/" to the tilde creates a correct virtual path.

```
virtualPath = "~/" + virtualPath.Substring(_baseVirtualPath.Length);
```

Can this be verified?
Comments: Fixed in v2.1.2. Can you please verify? Thanks!

Edited Unassigned: RazorGenerator build fails if RazorSrcFiles are specified in project [123]

$
0
0
After the May changes to RazorGenerator.target for Work Item 59, the build fails if the csproj manually specifies the list of cshtml files to precompile. This is because the RazorOutputFiles list is built using %(RecursiveDir) which is missing if you specify the source file in the standard csproj format like <RazorSrcFiles Include="Views\Home\NewUser.cshtml" />. This is because RecursiveDir only pays attention to the ** part of the include which is not present when the files are manually included. I believe the way to fix it is to use %(RelativeDir) instead of %(RecursiveDir).

Commented Unassigned: RazorGenerator build fails if RazorSrcFiles are specified in project [123]

$
0
0
After the May changes to RazorGenerator.target for Work Item 59, the build fails if the csproj manually specifies the list of cshtml files to precompile. This is because the RazorOutputFiles list is built using %(RecursiveDir) which is missing if you specify the source file in the standard csproj format like <RazorSrcFiles Include="Views\Home\NewUser.cshtml" />. This is because RecursiveDir only pays attention to the ** part of the include which is not present when the files are manually included. I believe the way to fix it is to use %(RelativeDir) instead of %(RecursiveDir).
Comments: Fixed in changeset 0c74cbf41f5e1f8060bb0d853688a36578ce02a8

Commented Unassigned: RazorGenerator build fails if RazorSrcFiles are specified in project [123]

$
0
0
After the May changes to RazorGenerator.target for Work Item 59, the build fails if the csproj manually specifies the list of cshtml files to precompile. This is because the RazorOutputFiles list is built using %(RecursiveDir) which is missing if you specify the source file in the standard csproj format like <RazorSrcFiles Include="Views\Home\NewUser.cshtml" />. This is because RecursiveDir only pays attention to the ** part of the include which is not present when the files are manually included. I believe the way to fix it is to use %(RelativeDir) instead of %(RecursiveDir).
Comments: Should be fixed in RazorGenerator.MsBuilld.2.1.3

Commented Issue: Allow PrecompiledMvcViewEngine to serve static files [12]

$
0
0
Modify PrecompiledMvcViewEngine to allow serving static files.
Comments: Supporting MVC4 bundling would be nice aswell

Commented Issue: Allow PrecompiledMvcViewEngine to serve static files [12]

$
0
0
Modify PrecompiledMvcViewEngine to allow serving static files.
Comments: You can do this using a (or [my](https://github.com/mcintyre321/EmbeddedResourceVirtualPathProvider)) Virtual Path Provider, and in a way, that makes more sense for non-razor assets.

Commented Issue: Views only found once in Release Mode [84]

$
0
0
This issue is identical to the one found in: http://razorgenerator.codeplex.com/workitem/55

I am new to codeplex, so I didn't know if I should add a new issue or not (because the original one is marked as fixed)

Everytime I hit refresh, I am getting the error:
"Value cannot be null.
Parameter name: view"

I am using:
RazorGenerator.Mvc
version: 1.3.2.0
size: 13.5 KB
date modified: 11/28/2012 8:44pm


This is happening upon Refresh (F5) when the project is in Release mode and web.config Debug is set to false.
Comments: I've encountered a similar issue but I'm using CompositePrecompiledMvcEngine as shown here: http://stackoverflow.com/questions/12943483/mvc-razor-separated-dll I'm running RazorGenerator.Mvc 2.1.1.

Commented Issue: Views only found once in Release Mode [84]

$
0
0
This issue is identical to the one found in: http://razorgenerator.codeplex.com/workitem/55

I am new to codeplex, so I didn't know if I should add a new issue or not (because the original one is marked as fixed)

Everytime I hit refresh, I am getting the error:
"Value cannot be null.
Parameter name: view"

I am using:
RazorGenerator.Mvc
version: 1.3.2.0
size: 13.5 KB
date modified: 11/28/2012 8:44pm


This is happening upon Refresh (F5) when the project is in Release mode and web.config Debug is set to false.
Comments: To expand on my comment: I have a few assemblies that share partial views from another assembly. I use the following to configure the assemblies to find the precompiled views: var engine = new CompositePrecompiledMvcEngine( PrecompiledViewAssembly.OfType<SharedAssembly>(HttpContext.Current.IsDebuggingEnabled), PrecompiledViewAssembly.OfType<AssemblyA>(HttpContext.Current.IsDebuggingEnabled)); ViewEngines.Engines.Insert(0, engine); VirtualPathFactoryManager.RegisterVirtualPathFactory(engine); Browsing to a web page that uses a partial view from the shared assembly will only load once. The second time I will get the error that has been reported here and in the other thread. Going through the source code I noticed that the ViewLocationCache is not being overwritten from the default MVC one in the CompositePrecompiledMvcEngine. I guess that's probably where the problem lies. A custom location cache class would probably be needed to deal with multiple assemblies. I have been able to work around this issue by creating regular PrecompiledMvcEngines for each of the assemblies (not the shared one) then creating composites that are inserted after the PrecompiledMvcEngines in the MVC view engine list.

Commented Issue: WriteAttributeTo does not exist [86]

$
0
0
Error occurs in generated code:
"The name 'WriteAttributeTo' does not exist in the current context"

Please refer to http://forums.asp.net/t/1804428.aspx/1

Comments: This is related to Razor Generator. I have the same problem with Razor Generator on Visual Studio 2012. The code generated by Razor Generator does not include namespaces listed under system.web.webPages.razor/pages/namespaces in Web.config and therefore a error occurs at compile time.

Commented Unassigned: Could not precompile the input file contents... [122]

$
0
0
I'm getting the following error on build...

Could not precompile the input file contents. Ensure that a generator declaration exists in the cshtml file.
A generator declaration is the first line of your cshtml file and looks like this:
@* Generator: MvcHelper *@
Valid host names: MvcHelper, MvcView, Template, WebPagesHelper, WebPage, RazorGenerator.Core.IHostProvider

I posted this issue under Discussions, but am opening up an issue so I can attach a sample project. The error occurs as soon as I drop a _ViewStart.cshtml file into the root of my project.

Comments: Thanks for the repro. I pushed out a new version of the package to fix this issue - https://www.nuget.org/packages/RazorGenerator.MsBuild/2.1.4

Edited Unassigned: Could not precompile the input file contents... [122]

$
0
0
I'm getting the following error on build...

Could not precompile the input file contents. Ensure that a generator declaration exists in the cshtml file.
A generator declaration is the first line of your cshtml file and looks like this:
@* Generator: MvcHelper *@
Valid host names: MvcHelper, MvcView, Template, WebPagesHelper, WebPage, RazorGenerator.Core.IHostProvider

I posted this issue under Discussions, but am opening up an issue so I can attach a sample project. The error occurs as soon as I drop a _ViewStart.cshtml file into the root of my project.

Viewing all 525 articles
Browse latest View live


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