Serenity: Instability in Serenity development environment

Created on 28 Feb 2017  Â·  24Comments  Â·  Source: serenity-is/Serenity

Hello all,

I've recently been having poor luck in getting "fresh" serenity applications built. When I create a new Serenity application by downloading the latest template, VS 2015 crashes the first time I build the T4 templates... and that's just the start of the problems. Sergen will no longer launch from the Package Manager console requiring me to run it manually, and sometimes I get errors when trying to connect to a database other than LocalDB.

As far as I've been able to get with 2.9.8 is to run Sergen successfully on a single table. Tables after that generate errors that appear to be caused by duplicate definitions of items in the project.

It could be my VS 2015 environment, but I just reinstalled that last week to correct problems with Serenity, and they still seem to be there.

It is very possible that these problems are my problems and not with Serenity, but I did want to check with the community and see if anyone else has been having "bad luck".

Overall, I still love the product, but I may start to fear that the feature additions might be outpacing the quality. It would be very helpful if there was an easy way to install old "stable" versions and start from there, but I don't know how to do that using VS Gallery.

Thanks,

James

Most helpful comment

First of all, sorry but all these problems are usually related to "ignorance".

I do what i can to make it as easy as possible to start a new project but there are some things i can't do how hard i try.

Users, which are developers has to learn reading the Readme first.

I can't install Visual Studio 2015 Update 3 to your computer myself.

If Visual Studio is crashing transforming templates first time but not next time, it is a Visual Studio bug not Serenity problem. There is no code to crash VS even if i wanted to.

Sergen cant be run from package manager console is a NuGet / VS path bug. It is noted even in first tutorial. It is asked a million times. I find it funny this is still reported as a bug. I cant fix VS bugs myself. This same problem applies to Entity Framework tools, go check their docs.

Similarly i cant install TypeScript 2.1.5 myself.

I couldnt install Node/NPM but still tried to install it in latest template even though it is not my business. A template is not supposed to control your PC. You check its readme to see presuquites.

Sorry but despite ignorance coming here and talking about low quality makes me pretty angry.

All 24 comments

First of all, sorry but all these problems are usually related to "ignorance".

I do what i can to make it as easy as possible to start a new project but there are some things i can't do how hard i try.

Users, which are developers has to learn reading the Readme first.

I can't install Visual Studio 2015 Update 3 to your computer myself.

If Visual Studio is crashing transforming templates first time but not next time, it is a Visual Studio bug not Serenity problem. There is no code to crash VS even if i wanted to.

Sergen cant be run from package manager console is a NuGet / VS path bug. It is noted even in first tutorial. It is asked a million times. I find it funny this is still reported as a bug. I cant fix VS bugs myself. This same problem applies to Entity Framework tools, go check their docs.

Similarly i cant install TypeScript 2.1.5 myself.

I couldnt install Node/NPM but still tried to install it in latest template even though it is not my business. A template is not supposed to control your PC. You check its readme to see presuquites.

Sorry but despite ignorance coming here and talking about low quality makes me pretty angry.

Hello Volkan,

First of all, let me say that I love Serenity. It has enabled us to do things that were simply not possible before. 

Also, I recognize (and I think I mentioned in my post) that the problems could be related to my Visual Studio 2015 Update 3 installation.  I wiped my machine completely and reinstalled from scratch, but this did not help. Nevertheless, I still think that VS could be the source of the problems.

I've also installed Typescript 2.1.5 and the Node/NPM, and it is clear that you are not able to do these tasks on my machine.  :-)

I did read the read-me, but I'll go through it again and see if there is something I missed.  What I find really strange is that I was able to get one table working normally, but when I ran Sergen to add more tables, I started getting TS errors. Looks like I'll have to dive a level deeper.

Thanks for all of the time and dedication you have put into Serenity. I know that I speak on behalf of thousands of developers when I say how much I appreciate your toolset!

James

On Feb 28, 2017, at 11:24 AM, Volkan Ceylan notifications@github.com wrote:

First of all, sorry but all these problems are usually related to "ignorance".
I do what i can to make it as easy as possible to start a new project but there are some things i can't do how hard i try.
Users, which are developers has to learn reading the Readme first.
I can't install Visual Studio 2015 Update 3 to your computer myself.
If Visual Studio is crashing transforming templates first time but not next time, it is a Visual Studio bug not Serenity problem. There is no code to crash VS even if i wanted to.
Sergen cant be run from package manager console is a NuGet / VS path bug. It is noted even in first tutorial. It is asked a million times. I find it funny this is still reported as a bug. I cant fix VS bugs myself. This same problem applies to Entity Framework tools, go check their docs.
Similarly i cant install TypeScript 2.1.5 myself.
I couldnt install Node/NPM but still tried to install it in latest template even though it is not my business. A template is not supposed to control your PC. You check its readme to see presuquites.
Sorry but despite ignorance coming here and talking about low quality makes me pretty angry.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Volkan,

Can you point to the readme file location? That should be enough to close this issue.

There is a welcome.htm file in template itself that is displayed when you create a new project. We also have the guide, troubleshooting wiki and some update howtos. I better write another detailed one (though not sure if it will be read), and its hard to keep it up to date, need one for every version. Also there are so many different configurations that i don't know how to find and list.

I've also confirmed (apparently) the same problem on my development environment at work.

Here's the first of the typescript errors I get...

C:\Users\M\documents\visual studio 2015\Projects\Muster2\Muster2\Muster2.Web\Imports/ServerTypings/Muster.BuildingForm.ts(4,18): warning TS2300: Duplicate identifier 'BuildingForm'.

As far as I know, I've followed all of the instructions in the ReadMe files, but I may have missed something. I've been working with Serenity for nearly a year so I'm fairly up to speed on the environment.

I will wait for another update to VS 2015 to come out (or Serenity to support the next version of VS) and then try again. Until then, I will remove modules from an old version of Serenity and use that one.

Thanks again!

James

On Feb 28, 2017, at 02:10 PM, Volkan Ceylan notifications@github.com wrote:

There is a welcome.htm file in template itself that is displayed when you create a new project. We also have the guide, troubleshooting wiki and some update howtos. I better write another detailed one (though not sure if it will be read), and its hard to keep it up to date, need one for every version. Also there are so many different configurations that i don't know how to find and list.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Deleting bin and obj folder might help...

Thanks for the tip... still having the same problems.

Jw

On Feb 28, 2017, at 03:27 PM, dfaruque notifications@github.com wrote:

Deleting bin and obj folder might help...

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Check that you don't have any files under Modules/Common/Imports. They are moved under Imports folder at root in recent template. Sergen might be creating them at the old location, if there is an error, or you are using an old version of Sergen. Check files using File Explorer, they might not be visible in VS.

Also make sure you have TypeScript 2.1.5 installed in Visual Studio (check from extensions dialog in VS, if you have 2.1.5 there, not 1.8.6) .

I'm using the latest Sergen, 2.1.5 of Typescript and 6.10.0 of NodeJS. I didn't see any files in Modules/Common/Imports... in fact there wasn't even a folder there for Imports.

I did manage to get VS to stop crashing when running the T4 template generation. Basically, after running the project template, instead of rebuilding and generating T4 templates, I shut VS down and restarted my machine. I figure VS was getting into an "unhappy state". This fixed the problem, I was able to rebuild and generate T4 with no problems after that.

When I went to import using Sergen, however, not so much luck. I can see TS errors scroll quickly past when I run Sergen.. then when I compile, I get these type of errors (see end of e-mail). It's almost like things are getting generated twice, but I can't find the second copy.

I'm curious to find out if I'm the only one having this problem... I had a colleague create a new Serenity app, and he also got some errors, but they were different (he was importing a different database). I'll try to replicate that tomorrow.

Here's a fragment of the TS error:

please notice that the slashes in the path have different orientations around the word "imports" (probably related to the .NET Core implementation on Linux / mac ?)... I'm not sure if this is related to the problem or not.

C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingForm.ts

1>------ Rebuild All started: Project: Muster4.Web, Configuration: Debug Any CPU ------

1> Muster4.Web -> C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\bin\Muster4.Web.dll

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingForm.ts(4,18): warning TS2300: Duplicate identifier 'BuildingForm'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingForm.ts(8,22): warning TS2300: Duplicate identifier 'BuildingForm'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingRow.ts(12,22): warning TS2451: Cannot redeclare block-scoped variable 'idProperty'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingRow.ts(13,22): warning TS2451: Cannot redeclare block-scoped variable 'nameProperty'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingRow.ts(14,22): warning TS2451: Cannot redeclare block-scoped variable 'localTextPrefix'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingRow.ts(17,34): warning TS2451: Cannot redeclare block-scoped variable 'BuildingId'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingRow.ts(18,34): warning TS2451: Cannot redeclare block-scoped variable 'BuildingName'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingRow.ts(19,34): warning TS2451: Cannot redeclare block-scoped variable 'FacilityId'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingRow.ts(20,34): warning TS2451: Cannot redeclare block-scoped variable 'FacilityFacilityCode'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingRow.ts(21,34): warning TS2451: Cannot redeclare block-scoped variable 'FacilityFacilityName'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingService.ts(5,22): warning TS2451: Cannot redeclare block-scoped variable 'baseUrl'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingService.ts(14,34): warning TS2451: Cannot redeclare block-scoped variable 'Create'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingService.ts(15,34): warning TS2451: Cannot redeclare block-scoped variable 'Update'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingService.ts(16,34): warning TS2451: Cannot redeclare block-scoped variable 'Delete'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingService.ts(17,34): warning TS2451: Cannot redeclare block-scoped variable 'Retrieve'.

1>

1>C:\Users\M\documents\visual studio 2015\Projects\Muster4\Muster4\Muster4.Web\Imports/ServerTypings/Muster.BuildingService.ts(18,34): warning TS2451: Cannot redeclare block-scoped variable 'List'.

On Feb 28, 2017, at 03:53 PM, Volkan Ceylan notifications@github.com wrote:

Check that you don't have any files under Modules/Common/Imports. They are moved under Imports folder at root in recent template. Sergen might be creating them at the old location, if there is an error, or you are using an old version of Sergen. Check files using File Explorer, they might not be visible in VS.

Also make sure you have TypeScript 2.1.5 installed in Visual Studio (check from extensions dialog in VS, if you have 2.1.5 there, not 1.8.6) .

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

image

Please paste a copy of what you have there

Looks the same to me. Also, I just noticed that replying by e-mail is putting a lot of spaces into the thread…. I’ll try to post directly to the forum from now on… this will be my last e-mail post. :-). Thanks! James

On Feb 28, 2017, at 5:42 PM, Volkan Ceylan notifications@github.com wrote:

https://cloud.githubusercontent.com/assets/752470/23414731/a77fcad8-fde5-11e6-9f23-6937a6b968e3.png
Please paste a copy of what you have there

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/volkanceylan/Serenity/issues/2002#issuecomment-283093928, or mute the thread https://github.com/notifications/unsubscribe-auth/AFkOulSQSRHHMSz1Bo5bipO6Ux1Wiezhks5rhE6PgaJpZM4MOLyt.

Maybe check if your csproj has the correct version
<TypeScriptToolsVersion>2.1</TypeScriptToolsVersion>
and restart VS...

At the time when I upgraded typescript, it made a mess with VS config... so it compiled with random typescript installed versions and kept VS crashing... might be the case... or maybe this helps someone else.

Best Regards

I was having problems last week, so I created a new Windows 10 VM and installed new VS directly from the MS website with all updates. New TS, new NodeJS. It's a pretty clean environment. Here's a clip from the VS project file:

2.1
True

Today, I'll look at the database and see if that could be part of the problem. I'm using GUID IDs but otherwise it is pretty standard. I'll create a very simple DB with integer IDs and see if I can replicate the problem.

Thx for the ideas!

Jw

:-). Last post ate my XML formatting around the 2.1 and true... let's try again.

<TypeScriptToolsVersion>2.1</TypeScriptToolsVersion> <TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>

To all, I created a trivial two-table database project with integer primary keys. Unfortunately, I'm still getting the following typescript error:

Severity Code Description Project File Line Suppression State
Error TS2300 Duplicate identifier 'Test1Form'. TypeScript Virtual Projects C:\Users\M\documents\visual studio 2015\Projects\Serene1\Serene1\Serene1.Web\Imports\ServerTypings\Muster.Test1Form.ts 4 Active

-- here's the code that gets generated by Serenity. I'm completely baffled!

`namespace TestApp.Muster {
export class Test1Form extends Serenity.PrefixedContext {
static formKey = 'Muster.Test1';
}

export interface Test1Form {
    TestName: Serenity.StringEditor;
    Test2Id: Serenity.IntegerEditor;
}

[['Test1Id', () => Serenity.IntegerEditor], ['TestName', () => Serenity.StringEditor], ['Test2Id', () => Serenity.IntegerEditor]].forEach(x => Object.defineProperty(Test1Form.prototype, <string>x[0], { get: function () { return this.w(x[0], (x[1] as any)()); }, enumerable: true, configurable: true }));

}`

export class Test1Form extends Serenity.PrefixedContext {
    static formKey = 'Muster.Test1';
}

export interface Test1Form {
    TestName: Serenity.StringEditor;
    Test2Id: Serenity.IntegerEditor;
}

I then went and reinstalled TypeScript... that didn't help (and unfortunately, it brought me to the 2.2 version, which I don't think I wanted).

Any more thoughts?

Thanks,

James

Just a thought... Are you sure you're setting module name, rootnamespace correctly when using sergen?

From the output you provided... It seems not... Just double check it.

Correct Version of typescript (2.1.5):
http://download.microsoft.com/download/6/D/8/6D8381B0-03C1-4BD2-AE65-30FF0A4C62DA/TS2.1-dev14update3-20170111.1/TypeScript_Dev14Full.exe

Best Regards

Yes... module name and root namespace were being set correctly as far as I know. I did make some progress... I'm using the 2.9.8 version of Serenity, but I have "borrowed" a Sergen from 2.9.1 and it works fine. If you like, I can generate two sets of files and diff them and see what's changed, although I'm not 100% sure which files to look at beyond those in the Modules section of my code. Thanks again for the assist!

I can report a similar issue as above.

Using VS 2015 Update 3, Typescript 2.2 installed (type tsc -v and get 2.2.1), Running Serenity 2.9.8

When I attempt to generate code from a single table I get 400+ typescript related errors (.ts files).

If I jump back to an older version of serenity (2.7.2), I can generate code from the same table with no issues.

@James-A-White

Error   TS2300  Duplicate identifier 'Test1Form'.   TypeScript Virtual Projects C:\Users\M\documents\visual studio 2015\Projects\Serene1\Serene1\Serene1.Web\Imports\ServerTypings\Muster.Test1Form.ts  4   Active

-- here's the code that gets generated by Serenity. I'm completely baffled!

`namespace TestApp.Muster {

Why do you insist you set your root namespace correctly while it is clearly seen from your copy/paste that it is not. Project name is Serene1 while your namespace is TestApp.Muster??

@jmace tsc -v is completely irrelevant. Check what you have in your Visual Studio Extensions dialog.

@volkanceylan Good to know.

Any insight on how to update typescript inside of VS? I've tried npm install -g typescript as well as simply downloading the exe and running it. Also tried directly from VS Extensions and updates form, but it only directs me to the same external exe download (That doesn't seem to get integrated into VS).

capture

Edson shared link above. You VS update 3

Yea... tried that as said above. It installed a newer typescript, but does not shake out what is in VS (1.8.36).

Try VS/TypeScript support

I'm not sure if this is still a problem, but many versions ago (~1 year), I had trouble when my namespace contained a dot like yours (TestApp.Muster). Get rid of the dot and try again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gfo2007 picture gfo2007  Â·  3Comments

ahsansolution picture ahsansolution  Â·  3Comments

StefanTheiner picture StefanTheiner  Â·  3Comments

john20xdoe picture john20xdoe  Â·  3Comments

dudeman972 picture dudeman972  Â·  3Comments