How do I update geckoFx45 to geckofx60? - browser

I have old project it is using geckofx45 with "xulrunner" folder in project.
I tried to replace it and update with geckofx60 from Nuget package but it doesn't have xulrunner folder after completed but instead it added "Firefox" called folder.
So what should I do? I can't even rebuild project now since I didn't make a copy of old project.

Could you try different initiation path?
Instead of
Xpcom.Initialize();
You could rename your Firefox folder to xulrunner then use
Xpcom.Initialize("xulrunner");
Or you keep the Firefox folder, and use
Xpcom.Initialize("Firefox");

Related

Why does VS 2017 set node_modules folder to read only in .Net Core App?

I'm building a .Net Core application using Angular for my client-side code. For the most part, I'm using the default template that is included in VS 2017. For whatever reason, VS is making my node_modules folder read only. Before I was able to install packages via command line in the directory that holds my client side code as well as my package.json file and my node_modules folder. Before I was able to do this, but now it is defaulting the folder to read only which is invaliding all of my npm commands. I've verified that this is the case because I can remove the read only attribute via windows explorer and then run any of my commands like npm install.
Has anyone else encountered this before? If so, what did you do to resolve this?
Thanks!
Okay, I found the answer. VS puts a lock on the node_modules folder while it is running.
So, I guess for now if you need to add packages just close VS first.

which files/folders to exclude from source control

Im setting up a unit test project and using SVN for source control. There are two nuget packages used. Im not sure if I need to exclude the files being generated or not.
MSTest.TestAdapter.1.2.0 and MSTest.TestFramework.1.2.0
When I go to commit the files within my branch, I see a lot of what look like new files being added in this folder MSTest.TestAdapter.1.2.0/build. eg.
MSTest.TestAdapter.1.2.0/build
MSTest.TestAdapter.1.2.0/build/_common/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll
Can I exclude everything from build/* ?
As a rule of thumb, you shouldn't keep Nuget packages in svn. In Visual Studio 2017 they are not event located in your project folder structure, but in %HOME%\.nuget\packages. Reference: Should we include Nuget PACKAGE folder in version control?
I would add whole packages folder to ignored if I were you.

How to develop node library referenced via local directory from another project?

Per this answer, when you reference a local dependency in package.json the local package will be copied to node_modules. This is not ideal when I'm developing a package and just referencing it from another project as I want to verify the library works correctly within another project. It seems every time I make a change to the library, I have to go back to my consuming project, delete the node_modules/my-library folder and rerun npm install each time for it to copy the library back. If I don't delete the folder first it doesn't seem to copy the latest version over.
If I develop directly inside node_modules/my-library it's not ideal because that folder isn't version controller, unlike the local folder referenced in package.json.
Another option would be to create an example project within the my-library repo, but I'd prefer to go that route as a last resort.
You can use npm link to develop your library and have another project use the local version like so.
For example;
In the my-library directory run npm link.
Then in the project you want to use my-libray run npm link my-library.
This will also work with yarn link.

How can I check `bin/` directories under `node_modules/` into TFS?

I have a Team Foundation Build server behind a firewall, and I would like to check in a node_modules/ directory (powering both a Browserify client app and Node server app) associated with a project so that all of the files and dependencies needed to deploy a build are available without fetching anything.
Checking node_modules/ in to TFS seemed to work at first, except that the bin/ directories appearing in around 20 of my NPM dependencies were not checked in. bin/ does not appear in my .tfignore (or anywhere else I know of that could be preventing the check in).
These bin/ directories don't appear in the included/excluded changes in Team Explorer, at all. It's possible to locate one of these folders in Windows Explorer and add it with the TFS context menu, but doing that for all of the dependencies would be horrifically tedious and error prone.
How can I persuade TFS to detect changes in these folders? Is there some other configuration affecting included/excluded changes that I'm not aware of?
It is not recommended to upload "bin" folder or "node_modules" folder into Version Control. But if you do want to do this, following the steps below:
Go to "C:\Users\youraccount\AppData\Local\Microsoft\Team Foundation\x.0\Configuration\VersionControl" folder and open "LocalItemExclusions.config" file. (There may several folders named like 1.0, 2.0, 3.0, you need to make sure open the folder your VS current use.)
Delete the lines like following and save the file:
<Exclusion>bin</Exclusion>
<Exclusion>*.dll</Exclusion>
Close Visual Studio.
Delete "node_modules" folder.
Restart Visual Studio.
Run "npm install" command to reinstall the node modules.
Check "Pending Changes", files in "bin" folder should be listed in "Excluded Changes" section.
To check if the files and bin folders will get ignored by TFS. You could try to manually add them (such as drag to source control explorer). If you couldn't, then must related to some .tfignore settings , you may double check this such as if there is a .tfignore file in the root of the project folder level.
If you could, there maybe something wrong with your workspace or source control mapping of the bin folder. Try to remove the source control bindings and rebinding to TFS. Also give a try with delete the old workspace and use a new workspace.
You shouldn't check in node_modules - ever.
Rather use browserify or WebPack (I'd recommend WebPack) to package up your bundle.js.
Add the bundle.js to your source/scripts folder. Reference your bundle.js from your html instead of any <../node_modules/../scripts>.
Remove the npm install from your build script. you won't need it now due to referencing your bundle.js
WebPack is a dev-step, but it secures the version of packages you used during development and also saves you the npm install headache during deployment.

Do I run '''grunt build''' after installing a bower component

I'm pretty new to grunt & npm etc but I'll explain what my question is as best I can.
I've got a local Wordpress project running with FoundationPress as the theme. I have grunt running etc.
I have just installed Foundation Datepicker via 'bower'. From the terminal it looks like everything went well and the Foundation Datepicker files are in my bower_components/ folder.
However I'm not sure if I should be changing directory to the bower_components/foundation-datepicker/ folder and running 'grunt build' command in that directory to "install" the datepicker? That folder does have a Gruntfile.js in it.
After installing Foundation Datepicker I did run 'grunt build', however that was in the theme folder, so I don't know if that would of picked up the newly downloaded Foundation Datepicker and installed/built that too.
It does say on the GitHub page towards the bottom that I should do a 'grunt build'. Please see here again: https://github.com/najlepsiwebdesigner/foundation-datepicker
Thanks guys.
Daniel.
I can't see .bowerrc file in the project
In the .bowerrc file, you should have the path like bower_components/folder as you want or bower_components/foundation-datepicker/folder
Probable solution -
Make a file named .bowerrc at the root level and put the path there as
{
"directory" : "js" //according to your present "foundation-datepicker.js" file location
}
I have realised that in my lack of experience in installing bower components to FoundationPress, that I was supposed to reference the files in the DOM myself once they had been downloaded using the 'bower install foundation-datepicker' command.
I have copied the files over to the suggested folders as in he README.md file and referenced the files in the DOM. The datepicker feature is now working.
So in conclusion I did run 'grunt build' in my theme directory after the 'bower install foundation-datepicker' command, and I believe this was required based on the README.md.
Finally yes you do need to run 'grunt build' but only in your theme directory. But you need to refence the fils yourself in order to use them in your project.

Resources