Hello Andreas,
Are you running the old site through Visual Studio? If you are it could be that the references to EPiServer.dll have to be repointed. Try removing and then re adding the reference.
/ Petter
Thanks for your reply.
Well.... im running the site having iis pointing at the folder where vs compiles it to.
The idea of having the wrong dlls is properly right. all referances to the dlls refers to the gac 256 version. i changed them all, to point to the 122 version, but got a episerver comile error when i hit the page.
Then i made a clean build, and hmmmmmmmm got all the dlls replaced with the 256 version....
Ill make an other attempt a little later on..
Andreas
Is there any follow-up information on this, as I'm having the same problem on one of our development servers?
Each WebServer on the server has its own IP address and DNS entry assigned for it and this is how I browse the sites:
http://epi-<clientwithv_122>.<ourdomain>.se
http://epi-<clientwithv_256>.<ourdomain>.se
I get the exact same error as in the initial post.
Any insight would be helpful!
Thanks.
Fredrik
I did check the refs. and the did point to the wrong project.
i changed the dlls again and can now show the error i recived as described in my last post...
first of all, the project compiles with out any problems, but when i hit the page i get this error message
Compiler Error Message: CS1519: Invalid token ',' in class, struct, or interface member declaration
Line 73: public virtual EPiServer.Personalization.GuiSettings, EPiServer EditTreeSettings {
Line 74: get {
Line 75: return ((EPiServer.Personalization.GuiSettings, EPiServer)(this.GetPropertyValue("EditTreeSettings")));
This is auto generated code.... pleace notice the comma between GuiSettings and EPiServer for the return type... this is not legal syntax..... this is also present in the type cast in the return statement.
The first time i ran into this problem was when i installed the old site (122) site using the 256 version. at that time i removed all the 256 dlls manually from my computer and got it to work in that way. But gone is the time and left is only the fund memory..
In VS the standard refs refers to the GAC dir of the newest version (C:\WINDOWS\assembly\GAC_MSIL\EPiServer\5.1.422.256__8fe83dea738b45b7). I can not change the gac dir to the 122 verson by browsing to it, and it is not shown in the .net tab. (this can be done by adding each dll int the registry manually)
anyway i added them all manually and got the error speified.
Maybe it would work i i found out how the referance is added from the gac to my project, because it it has been updated automaticlly in the old project at the time i installed the newest version.
feel free to comment if you have any input.
/Andreas
Compiler Error Message: CS1519: Invalid token ',' in class, struct, or interface member declaration,
after downloading a project from Team foundation server.
I have two versions of CMSManager installed on my machine atm og there will always come more ...
Anyone who can tell us how to avoid these problems in the future? (and fix this one ;)) ??
Getting the same error as other people here. I've tried removing all references and re-adding the correct dll's (256 in my case). The project compiles, but it only shows a server error when I try to run it.
Compiler Error Message: CS1519: Invalid token ',' in class, struct, or interface member declaration
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ad873a70\5d2c796d\App_Code.fquqextc.0.cs(118,62): error CS1519: Invalid token ',' in class, struct, or interface member declaration
c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ad873a70\5d2c796d\App_Code.fquqextc.0.cs(226,57): error CS1519: Invalid token ',' in class, struct, or interface member declaration
I had exactly the same problem today and found the following.
The personalization profile settings in the web.config are used to dynamically create a .cs file by the ASP runtime. This contains EPiServer.Personalization.SubscriptionInfo and .GuiSettings, both contained in EPiServer.dll.
In my project, EPiSever.dll was not in the bin folder so the runtime was using one elsewhere on my machine - and this was an old version - .122 I think - that does not contain the required classes. After putting the correct .256 version in the bin folder everything works again.
Cheers
To fix this check properties of all episerver references in project. My problem was that property "Specific Version" was False and even though I had correct version of dll's in bin folder website didn't work correctly.
After setting this property to True everything started working.
Having same problem with 6.0.318.113. Had newer version installed, but removed and installed this version.
Solution compiles just fine, but when visiting page I get this error.
Dear EPiServer team. How come you haven't fixed this after 3 years?
Make sure you have assembly redirects in web.config for all your dependencies. Assembly binding might seem like a bit of black magic and what versions you reference in your project may not be respected when the runtime loads them. It might find a different verison in GAC and use that one instead.
If you want to analyze deeper what assembly is requesting the wrong version and why it is being loaded you can use the fuslogvw tool in windows. To make it log the bindings from IIS you might have to change the app pool user to run as the same user account as you are running fuslogvw (your user account).
But first check that you have assembly redirects for all episerver assemblies pointing to the version you want to use.
Another tip is to manually edit the csproj file to see what versin is referenced. I usually stick all dependencies in a folder and reference them from there (the hintPath element in the .csproj xml). Then I remove all information in the reference except for the assembly name (no versions, guids, architectures etc) and set specific version to false (specificVersion element in the xml, it is default so if it is missing it means false).
Signs that might indicate that the bug is on your side and not the customers side:
Steps to take:
---
We are not using GAC. The reference is to the .dll's directly (included in project). I've completely uninstalled EPi from the system and checked GAC that it is gone. This same code works fine on other developer computers (using TFS). We all use dedicated plain Windows 2008 R2 virtual machines for development. In short: There is only one version of the .dll on the system, and this version is referenced. No black magic. (By the way, when adding to GAC you need to sign your assembly with a strong name - making it strongly named. If EPi properly and correctly respects the strongly named reference then "black magic" does not exist.)
From what I can determine you are actually generating the code run-time for IIS to compile. This run-time generation of code fails by generating invalid code. I'm sure there is a good reason for it, but "public virtual EPiServer.Personalization.GuiSettings, EPiServer EditTreeSettings {" is not valid code either way and it is generated by EPi.
Any other suggestions on where I can look? Burning valuable time here...
So whats the latest news here? found? confirmed? fixed?
---
In my case it was because I had added the new EPiServer.dll to the GAC and in the project but not set "Copy Local = True".
We encountered this too. It seems that the core problem with this always turns out to be some lack of assembly resolution around EPiServer.dll. In our case, that wasn't copied into the bin for some reason.
I worked on a project this spring using episerver 5.1.422.122 wish was installed using the manager tool.
Lately i joined a new project where i installed an other site using 5.1.422.256.
Both versions install there own common dlls with there own version number, and both registrate the dll in the GAC.
If is try to run the old site i get an error mesaage.
CS1705: Assembly "Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'EPiServer, Version=5.1.422.256, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' which has a higher version than referenced assembly 'EPiServer, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
Ofcause i dont want to do an upgrate to the old site, because several developers is working on it, and i dont want to force the to do the upgrate too, and even if it was possible to only do an upgrate to my local machine i dont like the idea of having differnet versions for production and development.
If anyone have any idea of what can be done i would greatly appreciate it
Best regards
Andreas