I am working on an old classic asp app which includes type libraries in an include file that is included at the top of every page:
<%
Session.LCID = 1033 'en-US
Session.CodePage = 65001
Response.LCID = 1033 'en-US
Response.charset ="utf-8"
%>
<!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" -->
<!--METADATA TYPE="typelib" UUID="420B2830-E718-11CF-893D-00A0C9054228" NAME="Microsoft Scripting Runtime" -->
<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Library" -->
<!--METADATA TYPE="TypeLib" UUID="94A0E92D-43C0-494E-AC29-FD45948A5221" NAME="Windows Image Acquisition (WIA) Automation Layer" -->
<%
I've read that type libraries can be included in a global.asa file. I tried it and it does work fine.
My question is - which is the more efficient place (performance wise) to include those, and why?
Related
I'm trying to distribute some SQL_SSDT Visual Studio code snippets using .vsi and .vscontent files, but I'm getting an error while installing:
The .vscontent file either contains invalid attributes or specifies a code snippet for a programming language that is not installed.
The .vscontent file is based on the documentation provided by Microsoft How to: Distribute Code Snippets
The sample on this site is the following:
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName> </FileName>
<DisplayName> </DisplayName>
<Description> </Description>
<FileContentType> </FileContentType>
<ContentVersion>2.0</ContentVersion>
<Attributes>
<Attribute name="lang" value=""/>
</Attributes>
</Content>
</VSContent>
My file looks like this:
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName>SSDTTest.snippet</FileName>
<DisplayName>SSDTTest</DisplayName>
<Description>SSDTTest</Description>
<FileContentType>Code Snippet</FileContentType>
<ContentVersion>1.0</ContentVersion>
<Attributes>
<Attribute name="lang" value="SQL_SSDT"/>
</Attributes>
</Content>
</VSContent>
I'm using the value SQL_SSDT since this is the required value in the .snippet files (<Code Language="SQL_SSDT">).
The installation starts as expected (double clicking on the .vsi file), the VS Content Installer pops up, lists the included content. The error occurs after hitting Finish. (Installation starts, but the above error pops up after a few seconds.)
The snippet is working fine if I copy it to the default snippet folder for SSDT (Documents\Visual Studio 2012\Code Snippets\SQL_SSDT\My Code Snippets) or if I'm adding it via snippet manager in SSDT, but the .vsi installation fails using the above file.
Am I missing something?
Installed VS products on this box:
SSDT
SSDT-BI
VS Express for Desktop (2012)
Update
I found the XML schema reference for the .vscontent files (VS2012), and it seems that the SQL_SSDT is not a valid value for the Lang attribute. It suggests that there are only four values available for the lang attribute. (csharp, jsharp, vb, xml).
Now the question is: Does SSDT add any extensions to this XML schema?
It seems that VS Content Installer has no support for deploying SSDT code snippets. There is a posted idea on visualstudio.uservoice.com which requests this feature, but it is still open.
I did not found any other resources related to this issue.
There is a possible workaround, which needs testing: You can create a PS/BAT which copies the snippet files into the VS's snippet folder for SSDT.
I have a MusicXML-File, beginning with
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0
partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
The file was generated with museScore and seems to be valid XML.
Opening this file in MS VS pro 2013 I get nine errors, among others:
"Fehler bei WebPermission-Anforderung für Umleitungs-URI."
<accidental>sharp</accidental>
<stem>up</stem>
<beam number="1">continue</beam> <---here (line 128)
</note>
<note default-x="265.48" default-y="-65.00" dynamics="92.22">
<pitch>
<step>G</step>
<alter>1</alter>
<octave>3</octave>
</pitch>
<duration>8</duration>
<voice>1</voice>
<type>eighth</type> <---here
<accidental>sharp</accidental>
<stem>up</stem>
<beam number="1">continue</beam>
</note>
<note default-x="303.52" default-y="-60.00" dynamics="84.44">
<pitch>
<step>A</step>
<alter>1</alter>
<octave>3</octave> <--- and here (line 147)
</pitch>
<duration>8</duration>
whereas previous occurences did not bother the compiler.
I have no cue what is the underlying cause for this behavior?
These errors refer actually to the lines in partwise.dtd (thumbs down for VS) and mean that VS failed to access included modules (.mod) due to security policy issues (different zones, etc.).
If you don't want to spend your precious time setting up security stuff, just set up your validation environment to work locally:
Disable the option: Visual Studio > Menu Tools > Options > Text Editor > XML > Miscellaneous > "Automatically download DTDs and schemas".
Download MusicXML Schema (XSD) and extract the whole content to a folder.
Edit the schema, e.g. musicxml.xsd, to import only from local files:
<xs:import (...) schemaLocation="xlink.xsd"/>
<xs:import (...) schemaLocation="xml.xsd"/>
(In this case, both dependencies will be already available in current folder.)
Open your XML file in VS and add the used schema to its properties (details in this answer).
Hint: If you get warnings about attributes being already declared, go to related file, then XML Menu > Schemas and mark double references as not to be used.
We're using wro4j with the Orange wr4j-taglib, and sometimes when we deploy its loading the same resource twice instead of two different ones, but not on all the servers. Below is the snippet from our groups in wro.xml. We're using the build time solution, so the hashes for the property file and all the concatenated files are being generated at build time.
<group name="insertImageCore">
<js>/static/js/imageinsert/js/imageInsert.js</js>
<js>/static/js/imageinsert/js/util/imageInsertUtils.js</js>
<js>/static/js/imageinsert/js/util/imageDAO.js</js>
<js>/static/js/imageinsert/js/util/serviceCalls.js</js>
<js>/static/js/imageinsert/js/util/search.js</js>
<js>/static/js/jquery.ux.thumbGrid.js</js>
<js>/static/js/jquery.ux.stateManager.js</js>
<css>/static/css/jquery.ux.thumbGrid.css</css>
<css>/static/css/jquery.ux.stateManager.css</css>
</group>
<group name="insertImage">
<group-ref>insertImageCore</group-ref>
<js>/static/js/imageinsert/js/actionBar.js</js>
<js>/static/js/imageinsert/js/imageEdit.js</js>
<js>/static/js/imageinsert/js/imageEditPicnik.js</js>
<js>/static/js/imageinsert/js/imageEditPicmonkey.js</js>
<js>/static/js/imageinsert/js/imageEditAviary.js</js>
<js>/static/js/imageinsert/js/imageEditNone.js</js>
<js>/static/js/imageinsert/js/insertProps.js</js>
<js>/static/js/imageinsert/js/tabsManager.js</js>
<js>/static/js/imageinsert/js/uploadManager.js</js>
<js>/static/js/imageinsert/js/zoomView.js</js>
<js>/static/js/imageinsert/js/imageEdit.js</js>
<js>/static/js/imageinsert/js/tabs/baseTab.js</js>
<js>/static/js/imageinsert/js/tabs/imageUrl.js</js>
<js>/static/js/imageinsert/js/tabs/myLibrary.js</js>
<js>/static/js/imageinsert/js/tabs/picasaLibrary.js</js>
<js>/static/js/imageinsert/js/tabs/stockGallery.js</js>
<js>/static/js/imageinsert/js/tabs/templateImages.js</js>
<js>/static/js/moment/moment.js</js>
<css>/static/js/imageinsert/css/imageInsert.css</css>
</group>
In our jsps we're referencing the two groups as:
<wro:style groupNames='insertImage' exploded="${_explodeScripts}" />
<wro:style groupNames='insertImageCore' exploded="${_explodeScripts}" />
It ends up being included in the jsp as:
<link rel='stylesheet' href='/wro/insertImageCore-46098451.css' />
<link rel='stylesheet' href='/wro/insertImageCore-46098451.css' />
We've checked our JBoss /tmp directory on the bad machines, and it seems to be cleared out correctly during the deploy. Any ideas as to what is going on?
It looks like your problem is the names your using. Try renaming either insertImage or insertImageCore so that they don't start with the same string.
When the taglib can't find the mapping file that tells it what the combined css name is for that group it uses a fallback mechanism. The taglib gets all the files that exist in the wro root (which you must have configured o it can build proper paths) and compares their file names to the requested group. This comparision uses startsWith so when it finds a file named inserImageCore while looking for insertImage it thinks it's found the right one.
This assumes that you either don't have a mapping file or that it isn't being loaded.
Using Chutzpah with Visual Studio 2012. I have an HTML test harness with tests inline. But Chutzpah doesn't seem to "scan" these files so that they appear in Test Explorer.
Here's the body of my HTML. I am including the qunit.js files. But the test "Can I find a div named myDiv?" never appears in Test Explorer. Do I need to put the HTML files in a certain folder in order to be detected?
In Tools->Options->Chutzpah, I have the Testing Mode set to "All"
<div id="myDiv"></div>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script>
test("Can I find a div named myDiv?", function () {
var myDivLength = $('#myDiv').length;
equal(myDivLength, 1, "expected 1, got " + myDivLength);
});
</script>
Has anyone experienced a simliar issue? I feel like Chutzpah is putting my Javascript in its own test harness HTML file rather than using mine. But with version 2.1, the documentation states it should use those files:
http://matthewmanela.com/
We currently have an old Installshield project file (ism) handed to us by our client, created in an unknown older version of Installshield Pro. It needs updating for a new release, but all we have available is Installshield Express 2011. (The install definitely does not actually use any feature unavailable in Express; it barely needs any features at all.)
We need, however, to retrieve a list of what it does do so we can duplicate it.
Is there any way to import, convert or examine the file? (Currently Express refuses to open it at all, because it was created in full Installshield.)
If you do not use specific Professional features you may open xml files with InstallShield LE after following modifications inside
InstallShield table node:
Insert <row><td>DefaultProductConfiguration</td><td>Express</td></row> after Current Media.
Insert <row><td>Limited</td><td>1</td></row> after ISUSSignature
Change "Type" from MSI to MSIE. i.e.:
<row><td>Type</td><td>MSIE</td></row>
This is excerpt from my config file which did the trick:
<table name="InstallShield">
<col key="yes" def="s72">Property</col>
<col def="S0">Value</col>
<row><td>ActiveLanguage</td><td>1033</td></row>
<row><td>Comments</td><td/></row>
<row><td>CurrentMedia</td><td dt:dt="bin.base64" md5="332cf0a04e9833f150480c96800db728">
UgBlAGwAZQBhAHMAZQAgADEAAQBXAGUAYgAgAEMAbwBuAGYAaQBnAHUAcgBhAHQAaQBvAG4A
</td></row>
<row><td>DefaultProductConfiguration</td><td>Express</td></row>
<row><td>EnableSwidtag</td><td>1</td></row>
<row><td>ISCompilerOption_CompileBeforeBuild</td><td>1</td></row>
<row><td>ISCompilerOption_Debug</td><td>0</td></row>
<row><td>ISCompilerOption_IncludePath</td><td/></row>
<row><td>ISCompilerOption_LibraryPath</td><td/></row>
<row><td>ISCompilerOption_MaxErrors</td><td>50</td></row>
<row><td>ISCompilerOption_MaxWarnings</td><td>50</td></row>
<row><td>ISCompilerOption_OutputPath</td><td><ISProjectDataFolder>\Script Files</td></row>
<row><td>ISCompilerOption_PreProcessor</td><td>_ISSCRIPT_NEW_STYLE_DLG_DEFS</td></row>
<row><td>ISCompilerOption_WarningLevel</td><td>3</td></row>
<row><td>ISCompilerOption_WarningsAsErrors</td><td>1</td></row>
<row><td>ISTheme</td><td>InstallShield Blue.theme</td></row>
<row><td>ISUSLock</td><td>{979EF698-F570-46B1-A89A-8FB2EBA0D64F}</td></row>
<row><td>ISUSSignature</td><td>{070AD25F-E904-4DB5-92BF-40E127BD43E7}</td></row>
<row><td>Limited</td><td>1</td></row>
<row><td>LockPermissionMode</td><td>1</td></row>
<row><td>MsiExecCmdLineOptions</td><td/></row>
<row><td>MsiLogFile</td><td/></row>
<row><td>OnUpgrade</td><td>1</td></row>
<row><td>Owner</td><td/></row>
<row><td>PatchFamily</td><td>MyPatchFamily1</td></row>
<row><td>PatchSequence</td><td>1.0.0</td></row>
<row><td>SaveAsSchema</td><td/></row>
<row><td>SccEnabled</td><td>0</td></row>
<row><td>SccPath</td><td/></row>
<row><td>SchemaVersion</td><td>773</td></row>
<row><td>Type</td><td>MSIE</td></row>
</table>
Express will not open such a file. However depending on whether the file's contents are text or binary, you can either open it with any XML or text editor, or with any MSI reading tool. For the latter there's Microsoft's Orca or various alternatives that are easier to download.