I need to use Razor Generator
as described here in a WPF
project but I can't add references to System.Web.WebPages
and System.Web.Razor
required by RAZOR Generator
. are these dlls unavailable in WPF
in general ? or I should change some configurations ?
Asked
Active
Viewed 3,203 times
3

mohsen dorparasti
- 8,107
- 7
- 41
- 61
-
why do you want to reference this assemblies in wpf project? – Kirill Bestemyanov Oct 24 '12 at 18:41
-
@KirillBestemyanov : these are required by RAZOR Generator – mohsen dorparasti Oct 24 '12 at 18:43
-
Razor generator is for generating classes from cshtml files as far as i know. But in wpf application there is no such files. So i ask again why do you want to use it in your wpf application? – Kirill Bestemyanov Oct 24 '12 at 18:52
-
@KirillBestemyanov : I want to create and save static html files using templates and user contents – mohsen dorparasti Oct 24 '12 at 18:53
-
1What is the target type of your WPF project? If .net 4.0 client profile change it to .net 4.0 and you should able to add the references. – nemesv Oct 24 '12 at 18:58
-
How it is seen "can't add references to System.Web.WebPages and System.Web.Razor". Is there any error? I try it in my VS (2012) and it become referenced without problems. – Kirill Bestemyanov Oct 24 '12 at 18:59
-
@nemesv : it was .net 4.0 client profile and I changed it to .net 4.0 but no difference . – mohsen dorparasti Oct 24 '12 at 18:59
-
@KirillBestemyanov : I can't find them in the list of .NET dlls – mohsen dorparasti Oct 24 '12 at 19:00
-
They are in Extensions, not in Framework – Kirill Bestemyanov Oct 24 '12 at 19:02
-
@KirillBestemyanov : sorry , but I didn't get the point ? – mohsen dorparasti Oct 24 '12 at 19:07
2 Answers
3
Did you search in Extensions (see screen shot)?

Kirill Bestemyanov
- 11,946
- 2
- 24
- 38
-
no , I have vs 2010 .I don't know how but it is solved by adding RazorGenerator.Templating through NuGet ! thank you anyway – mohsen dorparasti Oct 24 '12 at 20:37
1
I don't know why , but by installing RazorGenerator.Templating through NuGet ,all errors disappear , and it's working now .
update :
I finally could find those dll
s . the solution is :
1- first I changed target framework
from .NET framework 4 client profile
to .NET framework 4
.
2- then scrolled down the list of .NET components
, passed first list of system.web.
.. , scrolled down , and I found a second list of system.web.
.. at the bottom , they were there .
I hope this could help others

Community
- 1
- 1

mohsen dorparasti
- 8,107
- 7
- 41
- 61