I have a uskinned v8 skin and are trying to deport it to a GoDaddy hosted site. (First umbraco 8 / uskinned site to go live)
It wporks fine on a local machine but I get this error when live
error CS1002: ; expected
refering to 2 lines of code
public string Alias => "uSkinned";
public string Name => "uSkinned";
the ; are there.
C:\Windows\SysWOW64\inetsrv> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" ....
Microsoft (R) Visual C# Compiler version 4.8.3761.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.
This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer the latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=533240
g:\pleskvhosts\w-q-l.com.au\httpdocs\App_Code\USNBusinessLogic\USNSection.cs(7,29): error CS1002: ; expected
g:\pleskvhosts\w-q-l.com.au\httpdocs\App_Code\USNBusinessLogic\USNSection.cs(9,28): error CS1002: ; expected
However I are having a little more difficulty with
if (!_examineManager.TryGetIndex("ExternalIndex", out IIndex index))
throw new InvalidOperationException("No index found by name ExternalIndex");
so far I have come up with
try
{
if (!_examineManager.TryGetIndex("ExternalIndex", out IIndex index))
{
//we need to cast because BaseIndexProvider contains the TransformingIndexValues event
try
{
if (!(index.GetType() == typeof(BaseIndexProvider)))
{
BaseIndexProvider indexProvider = (BaseIndexProvider)index;
indexProvider.TransformingIndexValues += IndexProviderTransformingIndexValues;
}
}
catch
{
new InvalidOperationException("Could not cast");
}
}
}
catch
{
new InvalidOperationException("No index found by name ExternalIndex");
}
for those that come accross this the code now looks like
try
{
IIndex index = null;
if (!_examineManager.TryGetIndex("ExternalIndex", out index))
{
//we need to cast because BaseIndexProvider contains the TransformingIndexValues event
try
{
if (!(index.GetType() == typeof(BaseIndexProvider)))
{
BaseIndexProvider indexProvider = (BaseIndexProvider)index;
indexProvider.TransformingIndexValues += IndexProviderTransformingIndexValues;
}
}
catch
{
new InvalidOperationException("Could not cast");
}
}
}
catch
{
new InvalidOperationException("No index found by name ExternalIndex");
}
uSkinned uses strongly typed models. This error indicates that your website cannot find these models. Depending on the mode you are running these can be located in different places. You may not have uploaded your models to the webserver.
I was Running in pure Live mode. But turns out that goddady is blocking this from running. I now have a class library creating a dll with the models in it.
Also I needed to move the App_Code to its own class library.
Doing this also meant the C#5 / 6 variations didn't matter.
Sorry, just noticed your reply. Glad to hear you got this working. Just out of interest, how is your hosting going with GoDaddy? Any speed issues running your Umbraco website?
uskinned v8 skin deportation to GoDaddy
I have a uskinned v8 skin and are trying to deport it to a GoDaddy hosted site. (First umbraco 8 / uskinned site to go live)
It wporks fine on a local machine but I get this error when live
error CS1002: ; expected
refering to 2 lines of code
the ; are there.
Hi Daniel,
You should check your web host has the minimum requirements for hosting Umbraco V8.
https://our.umbraco.com/documentation/getting-started/setup/requirements/
Cheers,
Marc
Hosting is
MSSQL 2014 ASP.Net 4.8.3761 iiS10
File permissions are all set to read write create (Full Control)
This meets all the umbraco criteria
Put a none uskinned umbraco 8 site up and works fine.
Hi Daniel,
With our themes we provide uncompiled code within the App_Code folder so that you can make your own customisations.
The line that is failing is:
This code is shorthand code syntax which was introduced with C# 6
Your hosting server is trying to compile this code which it doesnt recognise because it is using an older version of C#
You can change this code to the following to avoid this error:
This code is found in file: ~/App_Code/USNBusinessLogic/USNSection.cs
Cheers,
Marc
Thanks Marc
That go that solved for others the next lines that are going to cause an issue is in USNExamineEvents.cs
I solved it like this (Marc please correct if I havent interpreted it correctly)
I changed these to
and
However I are having a little more difficulty with
so far I have come up with
but cant find a way round the "out"
Hi Daniel,
C# 7 allows for out parameters to be used without declaration. Before this version you need to declare the out parameter.
Add the following above your if statement:
Thanks again marc
for those that come accross this the code now looks like
The next question is
CS0246: The type or namespace name 'Usnstyle' could not be found (are you missing a using directive or an assembly reference?)
uSkinned uses strongly typed models. This error indicates that your website cannot find these models. Depending on the mode you are running these can be located in different places. You may not have uploaded your models to the webserver.
For further guidance on this see:
https://our.umbraco.com/documentation/reference/templating/modelsbuilder/
I was Running in pure Live mode. But turns out that goddady is blocking this from running. I now have a class library creating a dll with the models in it.
Also I needed to move the App_Code to its own class library.
Doing this also meant the C#5 / 6 variations didn't matter.
Thanks for all your help Marc
Sorry, just noticed your reply. Glad to hear you got this working. Just out of interest, how is your hosting going with GoDaddy? Any speed issues running your Umbraco website?
Hard to say we have crap internet here anyway.
This is the first version 8 site we have done seems to be as good as the other v7.
9:30pm here at present speedtest is 35Mbits download and 15 upload.
heres a link to our first umbraco v8 site.
https://w-q-l.com.au/
this is our own site on version 7
https://intelligencebydesign.com.au/
both running on godaddy hosting. with uskinned themes at there base.
Biggest problem I have here in Australia is finding decent hosting providers. A lot of cheap options but dont offer pleask or MSSql database.
Have now brought into the reseller plan with godaddy so kind of in there for the long haul.
is working on a reply...