Forum C# Project does not work in Visual Studio 2015

Project does not work in Visual Studio 2015

Postby SirGordon » July 20th, 2015, 7:34 pm

Hi!
I've just updated my IDE to Visual Studio Community edition 2015 and when i debug my game, it says there are static constructors in my classes.
What can I do to run my server side solution?
SirGordon
 
Posts: 26
Joined: October 30th, 2013, 9:26 pm

Re: Project does not work in Visual Studio 2015

Postby Kp0c » July 20th, 2015, 7:47 pm

I have that problem too, i think problem in new compilator. My soultion - install VS 2013. (Sorry for bad English :( )
Kp0c
 
Posts: 16
Joined: June 23rd, 2014, 9:29 pm

Re: Project does not work in Visual Studio 2015

Postby SirGordon » July 20th, 2015, 7:53 pm

Kp0c wrote:I have that problem too, i think problem in new compilator. My soultion - install VS 2013. (Sorry for bad English :( )


Yeah, I'm just using VS 2013 too..
SirGordon
 
Posts: 26
Joined: October 30th, 2013, 9:26 pm

Re: Project does not work in Visual Studio 2015

Postby ahmedselmi00 » July 23rd, 2015, 7:24 pm

same. Any fixes please ? :(
ahmedselmi00
Paid Member
 
Posts: 9
Joined: March 16th, 2014, 9:24 pm

Re: Project does not work in Visual Studio 2015

Postby mechanicallyseparatedgames » September 5th, 2015, 7:05 am

Same problem. Henrik, or other Yahoo Staff, could you please advise?
mechanicallyseparatedgames
 
Posts: 18
Joined: June 18th, 2014, 6:24 am

Re: Project does not work in Visual Studio 2015

Postby Guillaume » September 8th, 2015, 12:21 am

What is the default .NET Framework version defined in your project ?
Can you try to downgrade it and re-test ?
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: Project does not work in Visual Studio 2015

Postby Henrik » September 8th, 2015, 6:48 pm

We've had multiple reports of this, but we haven't had time to really dig into it.

A quick guess is that the new compiler is doing something "smart" to optimize the code and transforms it by adding a static intitializer, which our codescan then detects.

Quick suggested workarounds: Change the Target Framework of the project to ".Net Framework 4" instead of what's default in VS2015. Don't check the "Optimize code" checkbox in your build config.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Project does not work in Visual Studio 2015

Postby mechanicallyseparatedgames » September 18th, 2015, 5:42 am

I had a bit of trouble getting VS 2013 installed, so it took me some time to reply. Once I had VS 2013 installed, and the first time when loading my project that was previously built in VS 2015, VS 2013 told me that the project was built in .Net 4.5.2 and since I had uninstalled VS 2015, I didn't have 4.5.2 anymore and had to build it in .Net 4.5.0. It worked right away as Kp0c indicated.

Henrik your guess was similar to others whom I asked for advice, however not wanting to reinstall VS 2015 at the moment, I haven't been able to check.

I noticed that there was an update to the SDK today. Did it address this issue?
Last edited by mechanicallyseparatedgames on September 18th, 2015, 7:38 am, edited 1 time in total.
mechanicallyseparatedgames
 
Posts: 18
Joined: June 18th, 2014, 6:24 am

Re: Project does not work in Visual Studio 2015

Postby SirGordon » September 18th, 2015, 6:23 am

When i open the project in VS2015 target framework is still .Net 4.0 and "optimize code" is not checked but it's still not working with the same static stuff errors.

Maybe it's because VS2015 adds something for profiling.. or it's other new features?
SirGordon
 
Posts: 26
Joined: October 30th, 2013, 9:26 pm

Re: Project does not work in Visual Studio 2015

Postby Henrik » September 19th, 2015, 3:39 am

We'll have a fix for his released shortly.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Project does not work in Visual Studio 2015

Postby mechanicallyseparatedgames » September 19th, 2015, 4:33 am

Could somebody confirm that today's SDK build fixes this problem? I'd like to know before I install VS 2015 again.
mechanicallyseparatedgames
 
Posts: 18
Joined: June 18th, 2014, 6:24 am

Re: Project does not work in Visual Studio 2015

Postby Henrik » September 19th, 2015, 6:53 am

We have not released the fix yet.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Project does not work in Visual Studio 2015

Postby clzola » December 16th, 2015, 8:18 pm

Is this fixed, because I have just created new project in VS2015 and I am getting these 2 errors:
- Could not find any Player.IO room types in the dll.
- MyGame.GameCode/<>c..ctor() is static -- Static constructors are disallowed.

Targeted framework is .NET 4.0 and "Optimize Code" is not checked.
clzola
 
Posts: 6
Joined: January 7th, 2013, 2:36 pm

Re: Project does not work in Visual Studio 2015

Postby Henrik » December 16th, 2015, 10:01 pm

Yes, this was released on September 23rd, just a few days after my last post in this thread.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Project does not work in Visual Studio 2015

Postby clzola » December 16th, 2015, 10:06 pm

Henrik wrote:Yes, this was released on September 23rd, just a few days after my last post in this thread.


Then how do I fix these problems?
clzola
 
Posts: 6
Joined: January 7th, 2013, 2:36 pm

Re: Project does not work in Visual Studio 2015

Postby Henrik » December 17th, 2015, 10:04 pm

Are you sure you are using the latest development server and gamelibrary dll?

If it can't find your game code dll, then something's wrong with your project. When the dev server starts, you can click the name of the game code dll to make sure it's picked the right one. If you copied files over from another project, you may have copied over settings files that point to the completely wrong game code dll.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Project does not work in Visual Studio 2015

Postby clzola » December 27th, 2015, 7:26 pm

Sorry, I was not around for a while.
I have just downloaded new fresh SDK (v3.2.457, Decembar 18th), extracted and clicked twice on Serverside Code.VS2010.sln (Yahoo Games Network SDK.FfkETLs96FrH2bniwURzDw\Flash\NewGame\).
It is opened by VS2015 Community Edition, and then I pressed Run button.

Code: Select all
Server Started
========================
(waiting for connection)

Checking if newGame.dll is a game dll (from application directory)
- error: Could not find any Player.IO room types [RoomType(...)] in the dll.

Checking if newGame.dll is a game dll (from application directory)
- error: MyGame.GameCode/<>c..cctor() is static -- Static constructors are disallowed.


This is what I got. I am also on Windows 10 if that matters...
clzola
 
Posts: 6
Joined: January 7th, 2013, 2:36 pm

Re: Project does not work in Visual Studio 2015

Postby tripknotix » December 28th, 2015, 11:27 am

I have the exact same issue, i tried rebuilding as well.
tripknotix
Paid Member
 
Posts: 28
Joined: March 12th, 2010, 11:00 am

Re: Project does not work in Visual Studio 2015

Postby Henrik » January 5th, 2016, 11:28 pm

I do exactly what you do, Visual Studio 2015, the latest SDK zip file, open the project, press F5, sign in to the dev server as me, and it loads newGame.dll just fine?

Code: Select all
Server Started
========================
(waiting for connection)

Trying last loaded dll

Using Game Dll: newGame.dll
========================
(dll: C:\Users\IEUser\Desktop\Yahoo Games Network SDK.FfkETLs96FrH2bniwURzDw\Flash\NewGame\Serverside Code\Player.IO Test Server Project\bin\Debug\newGame.dll)

If you click on newGame.dll, can you explicitly pick the one from the latest SDK? What does it say then?

What's your target framework for both projects? I tried both 4.5 and 4.6.2, they both work.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Project does not work in Visual Studio 2015

Postby Nvd1234 » February 19th, 2016, 2:36 pm

The dev server works just fine, but it doesn't when uploading to YGN. It simply won't load.
Nvd1234
 
Posts: 2
Joined: December 9th, 2013, 6:42 pm

Re: Project does not work in Visual Studio 2015

Postby Guillaume » February 19th, 2016, 2:59 pm

It's probably related to the new Roslyn compiler of VS2015 ?
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: Project does not work in Visual Studio 2015

Postby tripknotix » February 19th, 2016, 3:29 pm

Just an update, never got this to work, with a project that started from VS 2010 in 2011, upgraded to VS 2012 back in 2012, now using VS 2013 since December 2015 because its the newest VS that will work with the old project. The project is about 4 years old now.

Its probably about time i start from scratch and just copy over the code to a new project, will have to consider that soon.
Last edited by tripknotix on February 24th, 2016, 8:01 am, edited 1 time in total.
tripknotix
Paid Member
 
Posts: 28
Joined: March 12th, 2010, 11:00 am

Re: Project does not work in Visual Studio 2015

Postby TD » February 19th, 2016, 8:52 pm

Yes that works just confirmed that method :D
TD
 
Posts: 11
Joined: February 3rd, 2016, 3:56 pm

Re: Project does not work in Visual Studio 2015

Postby Eloy » July 22nd, 2016, 7:28 am

I am Brazilian, I started using PlayerIO now googled already enough about servers and PlayerIO seemed the most attractive, but I find myself in exactly the same problem, absolutely everything I tested worked perfectly following what the site says, but only with examples ready (testing fridgemagnets for example), but with "new game" nothing worked ... both local server, such as uploading the DLL, both generated errors, actually I lost and discouraged encounter in using PlayerIO, I spent an entire morning trying solve, deleted and reinstalled the SDK numerous times but nothing .. :( (sorry my english lol)
Eloy
 
Posts: 1
Joined: July 18th, 2016, 7:01 am


Return to C#



cron