Possible issues - VS 2017 and X#, in Virtual Machine ...

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

Possible issues - VS 2017 and X#, in Virtual Machine ...

Post by Phil Hepburn »

Hi Robert, Team, and all X# community- friends and colleagues,

I returned from the great conference in Cologne to get my home office desktop computer system all up to date and 'clean', and sorted out.

You may remember that I had used the VS 2017 Installer app too many times on all three versions, and I seemed to have broken it all - the VS installer.

So then, with a new Beta version of X# in my hands, and the fact that I could make big changes to my system after the Conference, I got to work.

My plan was to make a Virtual Machine using 'Hyper-V' and then to only install on this VM the latest SQL Server, Visual Studio 2017, and also the latest X#. I was also to install Management Studio so I could help Michael and others with going to SQL with X#.

Well, after some hard work, and trial and error etc., I did eventually get a VM based on Windows 10 x64 and my VM could communicate with the Internet to allow me to install things in the modern usual way, via downloads (directly).

Okay then guys, what of my successes and failures ?

Success :- I have Visual Studio 2017 Professional installed and working. I have SQL Server 2016 (update 1) and the advanced tools (includes Management Studio). And finally I downloaded and installed the latest X# compiler into my VM platform.

Failure :- Any X# project I start (all as simple defaults) give me an error which restarts VS - a crash-out. The apps don't run after the restart.

The C# forms of the console, WinForms, and WPF all compile and run - which checks out my VS 2017 install.

So my questions are :- does the new VS2017 run apps outside of a Virtual Machine (remember I can't test this as my Installer is broken on the standard Win 10 O/S) without issue ?

Has anyone else got a Windows 10 VM running VS 2017 and X# ?

Any thoughts ? Any other tests I can do ?

I include one image of the many I took while setting up my VM. Oh! and soon I will make a small CHM set of eNotes to help any others who wish to make a VM, as it should prove very useful to X# work generally I feel.

What could I be missing on my VM platform ?

HELP !!! (Image to follow ?...)
TestVM_01.jpg
TestVM_01.jpg (39.03 KiB) Viewed 519 times
Phil.
Wales, UK.
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

Possible issues - VS 2017 and X#, in Virtual Machine ...

Post by Phil Hepburn »

Hi guys,

Thought you should at least see an image of success as far as a VM install of VS 2017 and X#, even if at the moment I get build errors after template selection.

Check this out :-
TestVM_02.jpg
TestVM_02.jpg (48.66 KiB) Viewed 519 times
I did have to work hard and long in order to get my Internet connection from the VM platform. Yes, I nearly gave up - a few times ;-0))

Cheers,
Phil.
User avatar
TimothyS
Posts: 62
Joined: Thu Dec 15, 2016 3:39 pm
Location: Australia

Possible issues - VS 2017 and X#, in Virtual Machine ...

Post by TimothyS »

Hi Phil,

This may be relevant for your issue. I run a copy of Win 10 as a virtual machine under VM Ware. Have VS 2015 installed along with X#. Put on Beta 11 and got crashes after template selection or trying to open X# projects.
Turns out I had the VM set to run with one core. Changed it to two core and it ran like a dream.
Many thanks to Robert for his help on this. I thought I would be the only one to fall into this trap, but thinking about it, anybody running VMs could be affected.

Regards,
Tim
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

Possible issues - VS 2017 and X#, in Virtual Machine ...

Post by Phil Hepburn »

Hi Tim,

Brilliant idea - and thanks again to Robert. I confess I had little expectations of a solution in the Forum ;-) Is this because of something in the X# stuff being made to be thread safe ?

Once I realised that the VM had to be brought down (closed) and then the settings changed, it was like magic.

Images attached to interest any and all.

I will make some eNotes to help anyone else interested in a VM solution.

Out of interest I have gotten some of my demo SQL database files to move over to the VM and open in Management Studio - am about to checkout VS 2017.

Tim - are you sure that cameras were invented when you looked like your picture ?

Cheers,
Phil.
TestVM_11.jpg
TestVM_11.jpg (73.64 KiB) Viewed 519 times
TestVM_12.jpg
TestVM_12.jpg (62.28 KiB) Viewed 519 times
TestVM_13.jpg
TestVM_13.jpg (80.01 KiB) Viewed 519 times
User avatar
TimothyS
Posts: 62
Joined: Thu Dec 15, 2016 3:39 pm
Location: Australia

Possible issues - VS 2017 and X#, in Virtual Machine ...

Post by TimothyS »

Hi Phil,

Apparently the code has been changed for the next build, so it will not be a problem. Impressed with Beta 11. SO much faster in loading projects.

Yes, the photo is a few years back. But it is me. A sort-of before shot :)

Regards,
Tim
beerhand

Virtual Machines - X# and related VS & SQL stuff ...

Post by beerhand »

Hi Phil,

the queries are executing with the same results. The 1. query is pretty easy to understand and by "examing" the second one I think it all makes sense. Challenge mostlikely will be to build such a query.

From your perspective: is it a must to fully understand SQL Query Building or do we do this in X#? I am asking as I might need to learn much more about SQL queries and a good book could help. If we do this with X# I will delay my query appetite for later.

Cheers,
Michael
Last edited by Phil Hepburn on Mon May 08, 2017 3:47 pm, edited 1 time in total.
Reason: Sorry. wrong assignemt - should go into the Virtual Machines - X# and related VS & SQL stuff ...Do not know how to move/delete it.
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

Virtual Machines - X# and related VS & SQL stuff ...

Post by Phil Hepburn »

Hi Michael,

Please don't worry about the SQL queries at all !

We will do all querying via the LINQ technology within X#.NET - it is much easier in many ways.

I was just using Management Studio to show that we had the right database in the correct folder, and could connect to it and get back results sets.

The JOIN query was to show that this approach is not limited to simple queries in MS.

If you spend time learning stuff then make it LINQ when we get to that stage.

While I was away I have managed to get my new demo X# app to connect to the same MDF and open a connection - so we are well on our way to success tomorrow.

Here is an image to give you some idea of where I am at :-
L2S_firstGoForum_11.jpg
L2S_firstGoForum_11.jpg (184.97 KiB) Viewed 519 times
And you probably should see my connection string builder class too :-
L2S_firstGoForum_12.jpg
L2S_firstGoForum_12.jpg (112.51 KiB) Viewed 519 times
Tomorrow we will start with one table and write code to retrieve data from it. Then this opens up the way to do lots of stuff within the X# .NET code.

Keep your fingers crossed that my VM and all the bits 'hold up' ;-0)
Cheers,
Phil.
Wales, UK.
Post Reply