cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

C# version in shared hosting

I am trying to use string interpolation on my site, but it appears that only up to C#5 is supported. I am having the exact issue which is reported in this StackOverflow post: https://stackoverflow.com/questions/58264292/compile-error-cs1056-unexpected-character-when-publishi...

 

Can someone please help?

 

 

4 REPLIES 4
Highlighted

Re: C# version in shared hosting

I have this working on an API, I know it does work.

There is a setting for the ASP.NET version, the options I have are 3.5.3 and 4.8.0.  The 3.5.3 option would limit you to C#3.

Make sure to set the version to 4.8.0 and try it again.

Highlighted

Re: C# version in shared hosting

Thanks for the response.

 

I just checked my settings and it looks as though I already have 4.8.0 selected.

Highlighted

Re: C# version in shared hosting

And you probably have:

<system.web>
    <compilation debug="true" targetFramework="4.7" />
    <httpRuntime targetFramework="4.7" />
</system.web>

in your Web.config?  

Highlighted

Re: C# version in shared hosting

Okay, after actually reading the post you linked to, I understand a little better.  I checked my Jenkins build/deploy steps and I run a build locally, using parameters: /p:Configuration=Release /p:DeployOnBuild=True /p:CreatePackageOnPublish=True /p:DeployTarget=Package.

 

So I'm the one doing the build, not GoDaddy.  

 

Then I use msdeploy.exe with the -dest as my site on GoDaddy:

"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package=TdtdAPI/obj/Release/Package/TdtdAPI.zip -dest:auto,computerName="https://api.tadaatiedye.com:8172/msdeploy.axd?site=api.tadaatiedye.com",username="hidden",password="alsohidden",includeAcls="False",authType='basic' -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"C:\TaDaaTieDye\SetParameters.xml" -allowUntrusted -setParam:name="IIS Web Application Name",value="api.tadaatiedye.com"

 

Also, you could just publish to a folder & then upload/FTP your files to the server.  

That would be the easiest & fastest way to at least test it out.