I created a new TypeScirpt project, added the json file to the solution, changed the 'Copy to Output directory' property to Copy always.
When I F5 the project, the browser complains that it cannot find the resource somedata.json
If I run the python SimpleHTTPServer, load up the same html file, it works.
<script type="text/javascript">
d3.json("somedata.json", draw);
</script>
Thank you.
Have you tried using the full path from the root of the site to obtain the somedata.json file?
d3.json("/scripts/somedata.json", draw);
Replace /scripts/ with the correct path in your instance, but start the address with a leading / to make it relative to the root.
This may be related to MIME types that the server used by Visual Studio is allowed to serve. You can define such MIME types at web.config btw if this is an ASP.net project.
Also see this official example in case it helps:
http://www.typescriptlang.org/Samples#D3
Have you tried to run the project using ASP.NET Development Server?
Related
While working on enabling/desabling a control in an Excel web complement the editor throw the following error :""property 'ribbon' doesn't exist on type 'type of office'" from an 'Office.ribbon instruction'.
My Excel Version is : 2104 (Build 13929 20296)
Here is a snapshot of the code code with office.ribbon. This code comes from https://learn.microsoft.com/fr-fr/office/dev/add-ins/design/disable-add-in-commands. Note than isSetSupported('RibbonApi', '1.1') ==true
Screen shot :
Xml of my addin
Make sure you specified the latest Office JavaScript API library in the add-in manifest. If you use runtime checks, you need to reference the most current version of the Office JavaScript API library from the content delivery network (CDN). To do this, add the following script tag to your HTML. Using /1/ in the CDN URL ensures that you reference the most recent version of Office.js.
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>
A workaround is to use message boxes. Off course it's quite Ugly, but I need to publish my app shortly. I hope that by this time I will find a way to actually enable/desable commands on this addin.
I made an empty project in vs 2015 with a basic component, but can't get it to work using IIS, I always get a blank page.
I am NOT using bower since I don't like it . I used vs's NPM to import all the files.
So, here is my setup in an image.
in my IIS I just right clicked the folder and set -> Convert to application, used the default integrated app pool as usual, and in the project I set it to use my IIS. The links works fine, if I type some text in the body it works.
What could be wrong?
I believe you will have issues with your structure. Most elements try to load Polymer in a link tag at the top of the component definition file ( tag-name.html) . Polymer expects every component to be within its own directory, as well as having the same parent. That being said, you could alter every file to look in the right location after downloading them all, or place all components, and the polymer library itself, into their own folders. A brief example:
App/
Scripts/
Polymer/
CustomComponent/
paper-material/ <-- downloaded paper component
This should allow you to not get 404s and multiple downloads of identical files.
The next issue is that you are using the Polymer 1.0 library but implementing it in the 0.5 API. Translating your element to 1.0 (including the conversion of elements into folders) would result in the following:
<link rel="import" href="../polymer/polymer.html">
<dom-module id="ad-nav" noscript>
<template>
<h1>Test</h1>
<template>
</dom-module>
This should straighten everything out.
I think the problem is you clicked "Convert to Application" in IIS. For regular HTML and JavaScript you do not need to click that option. Don't do that and it will work. Clicking "Convert to Application" in IIS assumes you want a .Net Application, not a plain JavaScript and HTML application. This changes file and folder permissions which caused your issue.
Our team has installed the Markdown Mode extension in Visual Studio on our Windows PCs, and we're happy with that as an editor for Markdown files, but we need a way to generate a wiki from those files where we can click on links that cross-link the files of the wiki. I've been trying to find something, but haven't had any success getting something running.
I tried creating an empty web application and pasting in the html file from here http://dynalon.github.io/mdwiki/#!index.md and naming it index.html, and adding a couple of md files to the same directory that I set to always copy to the build directory, but I got 404-3 errors when it tried to access the .md file.
I see a couple of tools that look possibly good but need Python or Ruby installed, which isn't ideal: http://markdoc.org/quickstart or http://helloform.com/projects/commonplace/
I see this ASP.NET control for embedding a Markdown file into a page http://wikicontrol.codeplex.com/ but the control is for VS 2010 so clearly is not being actively maintained, plus to use it I'll need to build something to take the relative links and find the related .md files and load them up in MVC - sounds like a hassle to get working, and it will require me to put MVC in my docs project.
Is there something that is just designed so that I can put an html file or similar in a directory with a root .md file and have it just immediately act like a wiki and allow navigation between them?
We have decided to use MarkdownDeep NuGet package and a single MVC controller to handle this. The MVC controller looks at the requested path, uses it to figure out the location of the Markdown file, reads that file and renders it to HTML and returns the HTML.
I have written a couple of t4 templates for EF4, I want to get other developers to use them, so id like to make them installable in VS so that people cna jsut add them to their projects.
I have no idea how to do this. Any idea about where i should start reading? Idid a quick google and had no luck.
Thanks.
An alternative is to create a VS item template.
There is an export template wizard accessed vie the File/ExportTemplate menu.
After you've exported a T4 template, you'll probably want to manually edit the resultign item, as it doesn't handle the generated file well by default.
You'll have your template from the wizard as a zip file.
Unzip this and remove the generated file.
Then edit the Foo.vstemplate file and remove the line referencing the generated file.
Finally zip the files up again.
Your colleagues can just drop this zip file into their user templates directory:
C:\Users\\Documents\Visual Studio 2010\Templates\ItemTemplates
For external sharing, your best bet is probably to create a nuget package.
Have a look at this link:
http://haacked.com/archive/2011/01/12/uploading-packages-to-the-nuget-gallery.aspx
I am working locally in a web site project with vs.net 2010.
How should I reference script and css files that are not in the immediate web site (application). The site will be deployed to a virtual directory (application) under a root site. The script (js) and css files are standard and are maintained in a vdir under the root site.
These are the requirements..
- the references must resolve when I push F5 (browsing to the site with built in iis server(cassini)
- within vs.net and in design view I need the references to the css files to be working so that we can view the styles correctly from within vs.net (as well as when we push F5, or if we setup a local web application on our IIS on our workstation)
Is this possible?
thx
No problem. Just use a fully qualified reference. (Absolute path)
<LINK href="http://www.somedomain.com/css/glob.css" rel="stylesheet" type="text/css" />
You've really got two choices: relative path, or absolute path. There's not a good compromise between these. From what you've described, relative path is not a good choice.
You will need to replace http://www.somedomain.com/css/glob.css with the servername and full path to the CSS that you want to reference. And, you will need to do the same for JS references.