This lightweight extension lets you display the full path of the file at bottom of Visual Studio’s Editor. Click Ctrl+Click to Open Containing Folder, Right click to Copy Full Path.
Compare two files in Solution Explorer – Visual Studio 2017 Extension – File Differ
The easiest way to diff two files directly in solution explorer
Query languages for JSON
jmespath, Javascript implementation of JMESPath, a query language for JSON
jmespath/jmespath.js
jq, is a lightweight and flexible command-line JSON processor:
https://stedolan.github.io/jq/
Getting started with .NET and Docker
Setting up EPiServer find demo index – The remote server returned an error: (413) Request Entity Too Large.
When running indexing for EPiServer find, the “EPiServer Find Content Indexing Job” in admin tools. The episerver find logs were filling up with these errors:
The remote server returned an error: (413) Request Entity Too Large.
Problem connected to restrictions for the developer demo index.
I added this setup method as last setup line to the FindInitializationModule:
private static void DemoIndexSetting() { string demoIndexSettings = ConfigurationManager.AppSettings["EnableEPiServerFindDemoIndexSettings"]; bool demoIndexEnabled = false; if (bool.TryParse(demoIndexSettings, out demoIndexEnabled)) { if (demoIndexEnabled) { /* * demo index has the following limitations: Maximum 10000 documents Maximum 5MB request size Maximum 25 queries per second The index will be removed after 90 days */ ContentIndexer.Instance.Conventions.ForInstancesOf<IContentMedia>().ShouldIndex(x => false); //dont index any mediafiles, size limit is 5MB ContentIndexer.Instance.MediaBatchSize = 3; //default 5 ContentIndexer.Instance.ContentBatchSize = 20; //default 100, but demo has limit of 25 } } }
Also added this setting to web.config to enable this feature for certain environments. (dev, test etc. using transformations)
<appSettings> ... <add key="EnableEPiServerFindDemoIndexSettings" value="true" />
Demo developer services:
Visual Studio 2017 not returning to correct line after ctrl click (go to definition) and closing window
For me the problem was connected to ReSharper which already implements this function. Solution was to disable the VS 2017 functionality for ctrl+click. (prefer the ReSharper way with built in decompiling)
Goto options -> Text Editor -> General -> uncheck “Enable mouse click…”
Disable the default vs2017 setting.
‘fatal: unable to access ‘\/.config/git/config’: Invalid argument’ when running VS 2017 and opening a GIT based solution
I got this message ‘fatal: unable to access ‘\/.config/git/config’: Invalid argument’ when opening a GIT based solution in VS 2017.
Solution was to add an environment variable “HOME” with value “c:\” (c: or where your project folder resides).
Solution info here:
ConfigTransformation – Visual Studio 2017 addon
Addon for visual studio 2017, lets you preview config file transformations.
New command in right click menu in solution explorer.
User accounts made easy with Azure | .NET Web Development and Tools Blog
How to solve Selenium error Element is not clickable at point (x, y) Other element would receive the click
The error message looks like this:
System.InvalidOperationException : unknown error: Element <... (html) ...> is not clickable at point (x, y). Other element would receive the click: <...(html)...> Stack trace at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.Remote.RemoteWebElement.Click()
Solution:
The clickable element is not ready, it might not be visible or clickable.
Sometimes the element is covered by another html element. (hide the covering element first).
Steps:
1. Wait for element to be visible
2. Wait for element to be clickable
3. Click with javascript
If this still this doesn’t work insert an implicit wait between step 1 and 2. (Thread.Sleep() in c#)
C# driver code to solve problems:
Wait for element to be visible and clickable (ElementToBeClickable = element is visible AND enabled.)
public IWebElement WaitUntilElementIsClickable(By findElementsBy) { var wait = new WebDriverWait(driver, timeoutForElementShouldBeVisibleInSeconds); try { var element = wait.Until(ExpectedConditions.ElementToBeClickable(findElementsBy)); return element; } catch (Exception exception) { string message = exception.Message + " at findElementsBy " + findElementsBy.ToString(); Exception customException = new Exception(message, exception); throw customException; } } public IWebElement WaitUntilElementIsClickable(By findElementsBy) { var wait = new WebDriverWait(driver, timeoutForElementShouldBeVisibleInSeconds); try { var element = wait.Until(ExpectedConditions.ElementToBeClickable(findElementsBy)); return element; } catch (Exception exception) { string message = exception.Message + " at findElementsBy " + findElementsBy.ToString(); Exception customException = new Exception(message, exception); throw customException; } }
Click with javascript:
public void ClickOnElement(string cssElementSelector) { string js = $"document.querySelector(\"{cssElementSelector}\").click()"; ExecuteJavascript(js); } public string ExecuteJavascript(string script) { return ExecuteJavascript<string>(script); } /// <summary> /// Executes JavaScript in the context of the currently selected frame or window. /// </summary> /// <typeparam name="T">The converted return type</typeparam> /// <param name="script">The JavaScript code to execute.</param> /// <param name="args">The arguments to the script.</param> /// <returns></returns> public T ExecuteJavascript<T>(string script, object[] args = null) { IJavaScriptExecutor javaScriptExecutor = uiTests.Driver as IJavaScriptExecutor; object result = null; var wait = new WebDriverWait(uiTests.Driver, timeout: TimeSpan.FromMinutes(3)); wait.Until(ExpectedConditions.ElementIsVisible(By.TagName("body"))); result = javaScriptExecutor.ExecuteScript(script, args); T typedResult = (T) result; return typedResult; }