To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: PowerShell Studio V 5.4.145.0
32 or 64 bit version of product: 64
Operating system:
32 or 64 bit OS: 64
*** Please add details and screenshots as needed below. ***
Editor shows a syntax error that says "The string is missing the terminator "@'" when the "@" is there. But it runs OK in PowerShell studio when I test.
Have included screen shot of same code in PowerGui editor, that does not show a syntax error.
Maybe it does not like the XML data? If data is just plain text it does not show an error.
This is the code:
$publishXmlData = @"
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IncludeCompositeObjects>True</IncludeCompositeObjects>
<TargetDatabaseName></TargetDatabaseName>
<DeployScriptFileName>publishXml</DeployScriptFileName>
<TargetConnectionString>Data Source=;Integrated Security=True;Pooling=False</TargetConnectionString>
<ProfileVersionNumber>1</ProfileVersionNumber>
<ScriptDatabaseOptions>True</ScriptDatabaseOptions>
<BlockOnPossibleDataLoss>False</BlockOnPossibleDataLoss>
<ScriptRefreshModule>False</ScriptRefreshModule>
</PropertyGroup>
</Project>`
"@
$publishXmlData | Out-Host
"Here string" shows error in editor when text is XML.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
"Here string" shows error in editor when text is XML.
- Attachments
-
- powergui example.png (66.15 KiB) Viewed 2095 times
-
- Here String Error.png (30.81 KiB) Viewed 2095 times
- Alexander Riedel
- Posts: 8488
- Last visit: Mon Apr 15, 2024 3:28 pm
- Been upvoted: 37 times
Re: "Here string" shows error in editor when text is XML.
This functionality is using Microsoft's own PowerShell parser.
It is possible that it misinterprets the position of the closing "@, which has to be on the beginning of a line, due to the backtic in the preceding line.
I would eliminate that and see what that does.
It is possible that it misinterprets the position of the closing "@, which has to be on the beginning of a line, due to the backtic in the preceding line.
I would eliminate that and see what that does.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.