Specflow generated feature.cs file not working - specflow

Last time it actually worked: Monday 27/07/2018
I've been using specflow for around 2 years now. But as of today (this week) I've got an issue I never encountered before. When changing even a single letter in the .feature file as usual Specflow will regenerate the .feature.cs file. But there it's going wrong. The file becomes blank with just a single line which is a reference to my temp folder C:\Users\Me...
The thing about my username is that it's my real name and it contains a special character: "ë". Could there be a new bug introduced in the newest version from monday 6/08/2018? If so, is there a workaround while waiting for it to be fixed? Or is something entirely different going wrong?

There is a bug in the latest version of the Visual Studio extension which has problems with special chars in the username, because it's used in the path to the temp directory.
There is a post about it in the forum (https://groups.google.com/forum/#!topic/specflow/977_H2ICwT8).
The quickest way to workaround this, is to change the generation mode to AppDomain (Tools\Options\SpecFlow)
The better way is to switch to the MSBuild generation, as we will remove the AppDomain generation mode in the next months.

Related

Breakpoints not hit in view/cshtml files after upgrade to v16.6.2?

I've been running VS 2019 for awhile now with no problems. I've been working on the same 2 solutions for the last year with no problems. Friday I upgraded to the latest version (16.6.2) because VS suggested I should. As soon as I did that, breakpoints in any MVC views no longer function in my project.
I have gone through the standard checklist of the old "No symbols have been loaded for this document" message. I have confirmed that the PDB files are in the right place, that the DLL and PDBs are of the same version, etc. Everything is exactly the same setting-wise as its always been. Friday morning it worked.
I installed the latest update (v16.6.2) and now the same breakpoint I had working a few hours before no longer works. Within this same project I CAN set a breakpoint in a controller or other classes - it seems to only be the .cshtml pages that are the problem.
My assumption is that one of 2 things occurred here: either v16.6.2 introduced a new setting I need to change in order for this to work, or v16.6.2 broke it. I have scoured the webs looking for any settings changes in this release and have come up empty. I have done the standard machine restart and all that stuff. No dice there either.
Are there any other troubleshooting steps I have missed?

Visual Studio 2019 (v16.3.5) - Updating EDMX File Changes Spacing and Indents On All Models

While switching over to a new computer I installed the latest version of Visual Studio 2019 (v16.3.5). As a result when I load the project and try to update the models from the database it updates every single model by changing indents and adding extra line breaks and spaces in places. As a result in git every single model shows up as being changed when in reality nothing was actually changed other than spacing. I tried to look for a setting which could change this but had no luck. Restarted VS a couple of times and tried to right click on edmx file and "Run Custom Tool" but no luck.
I have several coworkers who are running 16.1.3 and have no issues, so it looks like it could be something that changed/broke in a new release. I have read via forums about other users having issues with VS2019 and edmx related tasks but haven't encountered this exact problem yet on the web.
UPDATE: It looks like if I downgrade to 16.1.3 I still see the issue. It is the same version my coworkers are on and don't see it. Could this be some kind of setting?
Found a link finally where somebody had the same issue. It actually turned out to be line endings. I had to open the 2 .tt files I had in notepad++ and convert to windows and save. Once I did that I was able to update without all models changing.
Edmx generate model file with blank lines

Delphi consistently building DLLs to the wrong directory

I've got a group project built in Delphi XE2 that has 3 projects that always build to the wrong folder for one option set. (I've got 4 configurations under Release and Debug, one for our software configurations and one for FastMM and it's only the debug one that I want to use for debugging that always goes in to the wrong folder. Compiling the project even says it's building to the correct folder, but the DLL always winds up in a different one which I only used once when I was unit testing the code outside of the main project.
I've deleted every associated file, .identcache, .res, .tvsproj (whatever that was) and nothing changed. One very strange thing I noticed is that I copied one of the projects to configure the second one and mimics the behavior of the one it was copied from and I never even unit tested that one, so it never had that output path configured for it.
Obviously this makes it pretty annoying to debug, I have to copy files in to the correct folder just to do that (I was kind of astonished when it actually worked, because I thought Delphi might expect to find the files in it's output path, but oh well, those things are magic)
Let me know if I can post anything to help, I don't really know what's necessary, I checked the registry for the output path that it is getting built do and found nothing that I thought was of any consequence (nothing related to these projects).
One thing I did notice was, because I copied the original project into another project (they're plugins to the same part of the main program) it has the same and when I try using it in the "Build Group" it automatically selects both projects. That's one mystery solved, but is probably a red herring?
OK so as usually happens, after 3 years of suffering with this when I finally ask the questions I'm lead straight to the answer it appears as if RAD Studio is lying to us. The configuration shows this:
but the dproj had this:
in it.
there were two conditions for cfg_3 and only the last one showed up in RAD Studio, well for some odd reason the build path was taken from the first one (even though it's specified in both). So, removing the wrong one (the first one) fixed the problem and things are now building to the correct folder.
I had imported the Utils option set when I was testing the library, but when I incorporated the program in to the main program, I removed it. Somehow it didn't find it's way completely out of the dproj and I guess (not sure why) but it seems like the other library got messed up because it shared a GUID.

100+ errors in lib.d.ts with TypeScript in Visual Studio

I have a small-ish MVC4 web app using TypeScript for the clientside (~40 .ts files).
When I upgraded TS to 0.9.1.1, I now see 100+ errors in lib.d.ts appearing the error list in Visual Studio 2012.
The problem is unavoidable (all members of our team got the same thing when they upgraded), but literally impossible to reliably reproduce. Some behaviours:
The errors will not appear right away, only after a certain (seemingly random) amount of time.
They will usually be triggered on saving a file.
They are things like:
"All named properties must be subtypes of string indexer type 'any'"
Removing any .ts file from the project or restarting VS will make them go away for a time, but they will always come back.
The compiler still runs, and all .js files are generated correctly.
I have tried setting up a new empty project, in both VS2012 and VS2013 RC, then started adding our TS classes one by one. At some point, the errors will appear, but retracing steps has proved completely fruitless in identifying what might kick it off. However, it does seem to only happen as you approach 15-20 .ts files.
I'm at my wits end here.
PS. In the error list, the under the "Project" column, it often names a particular file, rather than a project. Quite often it's a definitions file, e.g. underscore.d.ts. Why would this be named as a Project?
EDIT:
I've managed to recreate this with a single .ts file and a handful of definition files.
App.ts
module Application {
export class Main {
constructor(options?) {
}
}
}
In addition to most recent versions of:
backbone.d.ts
jquery.d.ts
underscore.d.ts
backbone.relational.d.ts
I made many rapid changes and saves to App.ts to reproduce i.e. ~10 in 5 seconds. Could this suggest a file permissions error?
Go to visualstudiogallery
and make sure you have the latest version of typescript installed.
It seems that it is because of optimisations done in typescript language services. Visual studio tries to partially update the information for analysis, but once analysis lags, behind update commands this happens.
A temp fix is to cut the entire contents of the file, and paste them back, this gives the language service a fresh view of the file.

Incrementing Delphi XE project version number from command line

I have a Delphi XE project and I'm trying to change the version number of the program before building it with MSBuild. Version number information is located in the DPROJ file but if I change these values the version number does not change. I think the reason for this is that when you change version number in the IDE, Delphi saves the changes to both DPROJ and RES files.
Is there a way to compile the RES file from the command line with the changes in DPROJ file? I found this question which suggested saving the version number in an INC file and including that to the project but this feels a bit more complex solution compared to just making changes in DPROJ.
shameless plug: http://www.dummzeuch.de/delphi/dzprepbuild/englisch.html
I ended up solving my problem with this answer. First I unchecked "Include version information in project" in Project Options and added VersionInformation.rc with dummy data. When my build batch file is executed, it generates the correct RC file and because that RC file is added in to the Delphi project, MSBuild uses the contained information for built executable.
I use FinalBuilder to handle the version info. Isn't the stripped version bundled with your Delphi? If not, it is definitely worth the money. Makes releasing a one click action.
Yes you are right. Delphi keeps the version number in both project file and resource file. Unfortunately, resource files' structure is a bit complicated so it is not easy to update programmatically. When I came across this need, I ended up using a tool "SetVersion.exe" which did the job for me. It might help you as well. See this link.
EDIT
Actually now I remember, I used a different tool named "ChangeRes.exe" and it worked smoothly (but it is not free). You can try both and see which one works for you.
Some years ago, I have writed a script to build and increment build number using ruby and rake. Very easy to use.
After the build, the script calls Inno Setup and generates a new installer.

Resources